Fix cursor focus and selection in input box, add AWS env var warning box, and remove AWS Bedrock login banner

This commit is contained in:
2026-07-02 14:54:15 -05:00
parent 4770ac06b5
commit 3769646ca6
1194 changed files with 5312 additions and 8032 deletions
+3 -2
View File
@@ -1,10 +1,10 @@
use galaxyui::ui_components::components::UiComponent;
use galaxyui::{AppContext, Entity, SingletonEntity, View, ViewContext, ViewHandle};
use warpui::assets::asset_cache::AssetSource;
use warpui::elements::{
Align, CacheOption, ConstrainedBox, Container, CrossAxisAlignment, Element, Flex, Image,
MainAxisAlignment, MouseStateHandle, ParentElement, Wrap,
};
use galaxyui::ui_components::components::UiComponent;
use galaxyui::{AppContext, Entity, View, ViewContext, ViewHandle};
use super::settings_page::{
MatchData, PageType, SettingsPageEvent, SettingsPageMeta, SettingsPageViewHandle,
@@ -13,6 +13,7 @@ use super::settings_page::{
use super::SettingsSection;
use crate::appearance::Appearance;
use crate::channel::ChannelState;
use crate::settings::app_icon::AppIconSettings;
use crate::themes::theme::ColorScheme;
use crate::workspace::WorkspaceAction;
@@ -12,12 +12,12 @@ use ai::index::full_source_code_embedding::manager::CodebaseIndexManager;
not(any(test, feature = "integration_tests"))
))]
use ai::index::full_source_code_embedding::manager::CodebaseIndexManagerEvent;
#[cfg(all(feature = "local_fs", not(target_family = "wasm")))]
use git2::Repository as GitRepository;
use pathfinder_color::ColorU;
use galaxy_core::features::FeatureFlag;
use galaxy_core::paths::home_relative_path;
use galaxy_core::ui::theme::color::internal_colors;
#[cfg(all(feature = "local_fs", not(target_family = "wasm")))]
use git2::Repository as GitRepository;
use pathfinder_color::ColorU;
use warpui::elements::{
Align, Border, ChildView, ClippedScrollStateHandle, ClippedScrollable, ConstrainedBox,
Container, CornerRadius, CrossAxisAlignment, Dismiss, Element, Empty, Expanded, Flex,
@@ -751,7 +751,7 @@ fn available_indexed_repos(app: &AppContext) -> Vec<RepoEntry> {
})
.collect();
repos.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase()));
repos.sort_by_key(|a| a.name.to_lowercase());
repos
}
+192 -41
View File
@@ -3,11 +3,6 @@ use ::ai::api_keys::{ApiKeyManager, ApiKeyManagerEvent, ApiKeys};
use ::ai::grok_subscription::oauth::{self, ManualCodeExchange};
use chrono::{DateTime, Local};
use enum_iterator::all;
use itertools::Itertools;
use pathfinder_geometry::vector::vec2f;
use regex::Regex;
use settings::{Setting, ToggleableSetting};
use strum::IntoEnumIterator;
use galaxy_core::channel::ChannelState;
use galaxy_core::context_flag::ContextFlag;
use galaxy_core::features::FeatureFlag;
@@ -24,7 +19,7 @@ use galaxyui::elements::{
Text,
};
use galaxyui::fonts::{Properties, Weight};
use galaxyui::keymap::{ContextPredicate, Keystroke};
use galaxyui::keymap::{ContextPredicate, FixedBinding, Keystroke};
use galaxyui::platform::Cursor;
use galaxyui::ui_components::button::ButtonVariant;
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
@@ -34,6 +29,11 @@ use galaxyui::{
id, Action, AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext,
ViewHandle,
};
use itertools::Itertools;
use pathfinder_geometry::vector::vec2f;
use regex::Regex;
use settings::{Setting, ToggleableSetting};
use strum::IntoEnumIterator;
use super::custom_inference_modal::{
CustomEndpointModal, CustomEndpointModalEvent, CustomEndpointModalViewState,
@@ -86,19 +86,19 @@ use crate::editor::{
TextColors,
};
use crate::modal::{Modal, ModalEvent, ModalViewState};
use crate::settings::ai::BedrockAuthMethod;
use crate::settings::{
AIAutoDetectionEnabled, AICommandDenylist, AISettingsChangedEvent,
AgentModeCodingPermissionsType, AgentModeCommandExecutionDenylist,
AgentModeCommandExecutionPredicate, AgentModeQuerySuggestionsEnabled, AwsBedrockAutoLogin,
AwsBedrockCredentialsEnabled, CanUseWarpCreditsForFallback, CodeSettings,
CodebaseContextEnabled, FileBasedMcpEnabled, GitOperationsAutogenEnabled,
IncludeAgentCommandsInHistory, InputSettings, IntelligentAutosuggestionsEnabled,
LongRunningCommandSubmissionMode, MemoryEnabled, NLDInTerminalEnabled,
NaturalLanguageAutosuggestionsEnabled, OrchestrationMessageDisplayMode, PromptSubmissionMode,
RuleSuggestionsEnabled, SharedBlockTitleGenerationEnabled, ShouldRenderCLIAgentToolbar,
ShouldRenderUseAgentToolbarForUserCommands, ShouldShowOzUpdatesInZeroState, ShowAgentTips,
ShowConversationHistory, ShowHintText, ThinkingDisplayMode, VoiceInputEnabled,
WarpDriveContextEnabled,
AgentModeCommandExecutionPredicate, AgentModeQuerySuggestionsEnabled, BedrockAutoLogin,
BedrockEnabled, CanUseWarpCreditsForFallback, CodeSettings, CodebaseContextEnabled,
FileBasedMcpEnabled, GitOperationsAutogenEnabled, IncludeAgentCommandsInHistory, InputSettings,
IntelligentAutosuggestionsEnabled, LongRunningCommandSubmissionMode, MemoryEnabled,
NLDInTerminalEnabled, NaturalLanguageAutosuggestionsEnabled, OpenAIEnabled,
OrchestrationMessageDisplayMode, PromptSubmissionMode, RuleSuggestionsEnabled,
SharedBlockTitleGenerationEnabled, ShouldRenderCLIAgentToolbar,
ShouldRenderUseAgentToolbarForUserCommands, ShowAgentTips, ShowConversationHistory,
ShowHintText, ThinkingDisplayMode, VoiceInputEnabled, WarpDriveContextEnabled,
};
use crate::terminal::session_settings::{SessionSettings, SessionSettingsChangedEvent};
use crate::terminal::CLIAgent;
@@ -109,6 +109,7 @@ use crate::view_components::{
render_warning_box, FilterableDropdown, SubmittableTextInput, SubmittableTextInputEvent,
WarningBoxConfig,
};
use crate::workspace::ToastStack;
use crate::workspaces::user_workspaces::UserWorkspacesEvent;
/// Identifies which subpage of the AI settings the user is viewing.
@@ -362,7 +363,6 @@ pub fn init_actions_from_parent_view<T: Action + Clone>(
app.register_fixed_bindings(mode_bindings);
}
if FeatureFlag::QueueSlashCommand.is_enabled() {
let ai_context = context.clone() & id!(flags::IS_ANY_AI_ENABLED);
let mode_bindings: Vec<FixedBinding> = PromptSubmissionMode::iter()
.map(|mode| {
@@ -547,9 +547,9 @@ pub fn init_actions_from_parent_view<T: Action + Clone>(
FeatureFlag::AIRules.is_enabled() && FeatureFlag::SuggestedRules.is_enabled()
}),
ToggleSettingActionPair::new(
"Warp Drive as agent context",
"Galaxy Drive as agent context",
builder(SettingsAction::AI(
AISettingsPageAction::ToggleWarpDriveContext,
AISettingsPageAction::ToggleGalaxyDriveContext,
)),
&(context.clone() & id!(flags::IS_ANY_AI_ENABLED)),
flags::WARP_DRIVE_CONTEXT_FLAG,
@@ -1891,19 +1891,21 @@ impl AISettingsPageView {
}
});
}
// Subscribe to WarpConfig to refresh router views when files change.
// Subscribe to GalaxyConfig to refresh router views when files change.
#[cfg(feature = "local_fs")]
ctx.subscribe_to_model(
&crate::user_config::WarpConfig::handle(ctx),
&crate::user_config::GalaxyConfig::handle(ctx),
|me, _, event, ctx| {
use crate::user_config::WarpConfigUpdateEvent;
if matches!(event, WarpConfigUpdateEvent::ModelConfigs) {
use crate::user_config::GalaxyConfigUpdateEvent;
if matches!(event, GalaxyConfigUpdateEvent::ModelConfigs) {
me.router_views = Self::create_router_views(ctx);
ctx.notify();
}
},
);
let (page, _) = Self::build_page(None, ctx);
Self {
page,
active_subpage: None,
@@ -2660,7 +2662,6 @@ impl AISettingsPageView {
/// attempt's PKCE verifier.
#[cfg(not(target_family = "wasm"))]
fn submit_grok_code(&mut self, code: String, ctx: &mut ViewContext<Self>) {
use crate::view_components::DismissibleToast;
// Shared with the browser connect-flow toasts.
@@ -2794,10 +2795,9 @@ impl AISettingsPageView {
// Derive display name from model ID
let display_name = id
.split('/')
.last()
.next_back()
.unwrap_or(id)
.replace('-', " ")
.replace('_', " ");
.replace(['-', '_'], " ");
// Capitalize first letter of each word
let display_name = display_name
.split_whitespace()
@@ -2938,7 +2938,7 @@ impl AISettingsPageView {
}
widgets.push(Box::new(CloudHandoffWidget::default()));
widgets.push(Box::new(ApiKeysWidget::new(ctx)));
widgets.push(Box::new(AwsBedrockWidget::new(ctx)));
widgets.push(Box::new(BedrockSettingsWidget::new(ctx)));
if FeatureFlag::CustomModelRouters.is_enabled() {
widgets.push(Box::new(CustomModelRoutersWidget));
}
@@ -3483,12 +3483,12 @@ impl AISettingsPageView {
ctx: &mut ViewContext<Self>,
) -> Vec<ViewHandle<super::custom_router_view::CustomRouterView>> {
use super::custom_router_view::{CustomRouterView, CustomRouterViewEvent};
use crate::user_config::WarpConfig;
use crate::user_config::GalaxyConfig;
if !galaxy_core::features::FeatureFlag::CustomModelRouters.is_enabled() {
return Vec::new();
}
let routers: Vec<crate::ai::custom_model_routers::CustomModelRouter> =
WarpConfig::as_ref(ctx).custom_model_routers().clone();
GalaxyConfig::as_ref(ctx).custom_model_routers().clone();
routers
.into_iter()
.map(|router| {
@@ -3507,7 +3507,9 @@ impl AISettingsPageView {
#[cfg(feature = "local_fs")]
{
if let Err(e) =
crate::user_config::WarpConfig::delete_custom_model_router(path)
crate::user_config::GalaxyConfig::delete_custom_model_router(
path,
)
{
log::warn!("Failed to delete custom router: {e:?}");
}
@@ -3758,6 +3760,7 @@ pub enum AISettingsPageAction {
pattern: String,
agent: Option<CLIAgent>,
},
ToggleCloudAgentComputerUse,
}
impl From<&AISettingsPageAction> for LoginGatedFeature {
@@ -4450,6 +4453,14 @@ impl TypedActionView for AISettingsPageView {
});
ctx.notify();
}
AISettingsPageAction::ToggleCloudAgentComputerUse => {
AISettings::handle(ctx).update(ctx, |settings, ctx| {
report_if_error!(settings
.cloud_agent_computer_use_enabled
.toggle_and_save_value(ctx));
});
ctx.notify();
}
AISettingsPageAction::ToggleBedrockEnabled => {
AISettings::handle(ctx).update(ctx, |settings, ctx| {
report_if_error!(settings.bedrock_enabled.toggle_and_save_value(ctx));
@@ -7900,6 +7911,7 @@ impl SettingsWidget for AgentAttributionWidget {
mod tests;
#[derive(Default)]
#[allow(dead_code)]
struct CloudAgentComputerUseWidget {
toggle: SwitchStateHandle,
}
@@ -8241,7 +8253,7 @@ impl ApiKeysWidget {
ctx.subscribe_to_view(&$editor, |_, $editor, event, ctx| {
if matches!(event, EditorEvent::Blurred | EditorEvent::Enter) {
let buffer_text = $editor.as_ref(ctx).buffer_text(ctx);
let key = buffer_text.is_empty().not().then_some(buffer_text);
let key = (!buffer_text.is_empty()).then_some(buffer_text);
ApiKeyManager::handle(ctx).update(ctx, |model, ctx| {
model.$set_func(key, ctx);
});
@@ -9054,10 +9066,8 @@ impl SettingsWidget for ApiKeysWidget {
}
}
struct AwsBedrockWidget {
aws_auth_refresh_command_editor: ViewHandle<EditorView>,
aws_auth_refresh_profile_editor: ViewHandle<EditorView>,
credentials_enabled_toggle: SwitchStateHandle,
struct BedrockSettingsWidget {
enabled_toggle: SwitchStateHandle,
auto_login_toggle: SwitchStateHandle,
auth_method_dropdown: ViewHandle<Dropdown<AISettingsPageAction>>,
profile_dropdown: ViewHandle<Dropdown<AISettingsPageAction>>,
@@ -9366,6 +9376,15 @@ impl SettingsWidget for BedrockSettingsWidget {
let mut column = Flex::column().with_spacing(16.);
let has_aws_env = std::env::vars_os().any(|(k, _)| k.to_string_lossy().starts_with("AWS_"));
if has_aws_env {
column.add_child(render_warning_box(
WarningBoxConfig::new("You have AWS environment variables defined, which may override these settings."),
appearance,
));
}
column.add_child(render_ai_setting_toggle::<BedrockEnabled>(
"Enable AWS Bedrock",
AISettingsPageAction::ToggleBedrockEnabled,
@@ -9641,6 +9660,135 @@ impl OpenAISettingsWidget {
}
}
impl SettingsWidget for OpenAISettingsWidget {
type View = AISettingsPageView;
fn search_terms(&self) -> &str {
"openai litellm custom provider endpoint api key models"
}
fn should_render(&self, _app: &AppContext) -> bool {
true
}
fn render(
&self,
_view: &Self::View,
appearance: &Appearance,
app: &AppContext,
) -> Box<dyn Element> {
let ai_settings = AISettings::as_ref(app);
let is_enabled = *ai_settings.openai_enabled.value();
let mut column = Flex::column().with_spacing(16.);
column.add_child(render_ai_setting_toggle::<OpenAIEnabled>(
"Enable OpenAI-Compatible Provider",
AISettingsPageAction::ToggleOpenAIEnabled,
is_enabled,
true,
self.enabled_toggle.clone(),
&RefCell::new(HashMap::new()),
app,
));
column.add_child(render_ai_setting_description(
"Route AI requests through an OpenAI-compatible endpoint (e.g. LiteLLM proxy).",
true,
app,
));
column.add_child(render_separator(appearance));
column.add_child(Self::render_input(
appearance,
"Base URL",
self.base_url_editor.clone(),
is_enabled,
app,
));
column.add_child(render_ai_setting_description(
"The OpenAI-compatible API base URL (e.g. http://localhost:4000/v1).",
is_enabled,
app,
));
column.add_child(Self::render_input(
appearance,
"API Key",
self.api_key_editor.clone(),
is_enabled,
app,
));
column.add_child(render_ai_setting_description(
"Optional. Leave empty if the proxy handles authentication.",
is_enabled,
app,
));
column.add_child(render_separator(appearance));
// Fetch models button
let fetch_button = appearance
.ui_builder()
.button(ButtonVariant::Secondary, self.fetch_button.clone())
.with_text_label("Fetch Models from Endpoint".to_owned())
.build()
.on_click(move |ctx, _, _| {
ctx.dispatch_typed_action(AISettingsPageAction::FetchOpenAIModels);
})
.finish();
column.add_child(fetch_button);
column.add_child(render_ai_setting_description(
"Queries the /models endpoint and populates the model list with available models and their context window sizes.",
is_enabled,
app,
));
column.add_child(render_separator(appearance));
// Show configured models count
let configured_models: Vec<_> = ai_settings.openai_models.value().clone();
if !configured_models.is_empty() {
let description = format!(
"{} model{} configured via settings.toml.",
configured_models.len(),
if configured_models.len() == 1 {
""
} else {
"s"
}
);
column.add_child(render_ai_setting_description(description, is_enabled, app));
// Show first few model names
let preview: String = configured_models
.iter()
.take(5)
.map(|m| m.display_name.as_str())
.collect::<Vec<_>>()
.join(", ");
let suffix = if configured_models.len() > 5 {
format!(" (+{} more)", configured_models.len() - 5)
} else {
String::new()
};
column.add_child(render_ai_setting_description(
format!("Models: {preview}{suffix}"),
is_enabled,
app,
));
} else {
column.add_child(render_ai_setting_description(
"No models configured. Use 'Fetch Models' or add them to ~/.galaxy/settings.toml under [ai.openai].",
is_enabled,
app,
));
}
column.finish()
}
}
/// Stable `&'static str` id for the custom model routers settings widget,
/// exposed for the `warp://settings?widget=custom_router` deeplink (see
/// `settings_widget_deeplink_target`).
@@ -9681,10 +9829,12 @@ impl SettingsWidget for CustomModelRoutersWidget {
.with_child({
#[cfg(feature = "local_fs")]
{
galaxyui::elements::Container::new(view.add_router_button.as_ref(app).render(app))
.with_margin_bottom(4.)
.with_margin_top(-4.)
.finish()
galaxyui::elements::Container::new(
view.add_router_button.as_ref(app).render(app),
)
.with_margin_bottom(4.)
.with_margin_top(-4.)
.finish()
}
#[cfg(not(feature = "local_fs"))]
{
@@ -9710,9 +9860,10 @@ impl SettingsWidget for CustomModelRoutersWidget {
#[cfg(feature = "local_fs")]
let column = {
use super::custom_router_view::render_router_error_card;
use crate::user_config::GalaxyConfig;
let mut c = column;
// Error cards (files that failed to parse) — shown first
let errors = WarpConfig::as_ref(app).custom_model_router_errors();
let errors = GalaxyConfig::as_ref(app).custom_model_router_errors();
for error in errors.iter() {
c.add_child(
Container::new(render_router_error_card(
+7 -4
View File
@@ -56,12 +56,13 @@ use crate::gpu_state::{GPUState, GPUStateEvent};
use crate::prompt::editor_modal::OpenSource as PromptEditorOpenSource;
use crate::server::telemetry::{InputUXChangeOrigin, TelemetryEvent};
use crate::settings::app_icon::{AppIcon, AppIconSettings, ShowDockIconState};
use crate::settings::font::DEFAULT_UI_FONT_NAME;
use crate::settings::{
active_theme_kind, respect_system_theme, AIFontName, AppEditorSettings, CursorBlink,
CursorBlinkEnabled, CursorDisplayType, EnforceMinimumContrast, FocusPaneOnHover, FontSettings,
FontSettingsChangedEvent, GPUSettings, InputBoxType, InputModeSettings, InputModeState,
InputSettings, InputSettingsChangedEvent, MonospaceFontName, PaneSettings,
ShouldDimInactivePanes, ThemeSettings, UseSystemTheme, UseThinStrokes,
ShouldDimInactivePanes, ThemeSettings, UIFontName, UseSystemTheme, UseThinStrokes,
DEFAULT_MONOSPACE_FONT_NAME,
};
use crate::terminal::block_list_viewport::InputMode;
@@ -76,11 +77,13 @@ use crate::terminal::settings::{
use crate::terminal::{
BlockListSettings, ShowBlockDividers, ShowJumpToBottomOfBlockButton, SizeInfo,
};
use crate::themes::theme::{self, RespectSystemTheme, SelectedSystemThemes, ThemeKind, WarpTheme};
use crate::themes::theme::{
self, GalaxyTheme, RespectSystemTheme, SelectedSystemThemes, ThemeKind, WarpTheme,
};
use crate::themes::theme_chooser::ThemeChooserMode;
use crate::ui_components::color_dot::{render_color_dot, TAB_COLOR_OPTIONS};
use crate::ui_components::icons::Icon;
use crate::user_config::WarpConfig;
use crate::user_config::{GalaxyConfig, WarpConfig};
use crate::util::bindings;
use crate::view_components::action_button::{ActionButton, ButtonSize, NakedTheme};
use crate::view_components::{Dropdown, DropdownItem, FilterableDropdown};
@@ -3101,7 +3104,7 @@ impl SettingsWidget for CustomAppIconWidget {
let app_icon_at_startup = AppearanceManager::as_ref(app).app_icon_at_startup();
let current_icon = *AppIconSettings::as_ref(app).app_icon;
if current_icon == AppIcon::Default
if current_icon == AppIcon::Galaxy
&& ChannelState::channel() != Channel::Local
&& app_icon_at_startup != AppIcon::Galaxy
{
@@ -1,10 +1,10 @@
use std::cell::RefCell;
use std::collections::HashMap;
use galaxy_core::ui::appearance::Appearance;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use thousands::Separable;
use galaxy_core::ui::appearance::Appearance;
use warpui::elements::{
Align, Border, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, DropShadow, Empty,
Flex, MainAxisAlignment, MainAxisSize, MouseStateHandle, ParentElement, Radius, Shrinkable,
@@ -1,10 +1,10 @@
use std::collections::HashMap;
use galaxy_core::channel::ChannelState;
use galaxy_core::ui::appearance::Appearance;
use itertools::Itertools as _;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use galaxy_core::channel::ChannelState;
use galaxy_core::ui::appearance::Appearance;
use warpui::elements::{
Border, ChildAnchor, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, DropShadow,
Empty, Expanded, Flex, Hoverable, MainAxisAlignment, MainAxisSize, MouseStateHandle,
@@ -1,8 +1,8 @@
use chrono::{DateTime, Datelike, Local, Utc};
use galaxy_core::ui::appearance::Appearance;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use galaxy_core::ui::appearance::Appearance;
use warpui::elements::{
Border, ChildAnchor, ChildView, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment,
DropShadow, Empty, Flex, FormattedTextElement, HighlightedHyperlink, Hoverable, HyperlinkLens,
@@ -1,5 +1,5 @@
use pathfinder_geometry::vector::vec2f;
use galaxy_core::ui::appearance::Appearance;
use pathfinder_geometry::vector::vec2f;
use warpui::elements::{
Border, ChildAnchor, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Empty,
Expanded, Flex, Hoverable, MainAxisAlignment, MainAxisSize, MouseStateHandle,
@@ -3,12 +3,6 @@ use std::collections::HashMap;
use std::sync::Arc;
use chrono::Local;
use itertools::Itertools;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use settings::Setting;
use thousands::Separable;
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::appearance::Appearance;
use galaxy_core::ui::theme::Fill;
@@ -29,6 +23,12 @@ use galaxyui::{
AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView, UpdateView, View,
ViewContext, ViewHandle,
};
use itertools::Itertools;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use settings::Setting;
use thousands::Separable;
use super::admin_actions::AdminActions;
use super::billing_and_usage::overage_limit_modal::{SpendingLimitModal, SpendingLimitModalEvent};
@@ -1072,8 +1072,10 @@ impl BillingAndUsagePageAction {
impl From<&BillingAndUsagePageAction> for LoginGatedFeature {
fn from(val: &BillingAndUsagePageAction) -> LoginGatedFeature {
match val {
Upgrade { .. } => "Upgrade Plan",
GenerateStripeBillingPortalLink { .. } => "Generate Stripe Billing Portal Link",
BillingAndUsagePageAction::Upgrade { .. } => "Upgrade Plan",
BillingAndUsagePageAction::GenerateStripeBillingPortalLink { .. } => {
"Generate Stripe Billing Portal Link"
}
_ => "Unknown reason",
}
}
@@ -3,14 +3,14 @@ use std::collections::HashMap;
use std::sync::Arc;
use chrono::Local;
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::appearance::Appearance;
use itertools::Itertools;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use settings::Setting;
use thousands::Separable;
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::appearance::Appearance;
use warp_graphql::billing::AddonCreditsOption;
use warpui::elements::{
Align, Border, Clipped, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Empty,
+5 -5
View File
@@ -9,11 +9,6 @@ use ai::index::full_source_code_embedding::manager::{
use ai::index::full_source_code_embedding::SyncProgress;
use ai::project_context::model::{ProjectContextModel, ProjectContextModelEvent};
use ai::workspace::WorkspaceMetadata;
use lsp::supported_servers::LSPServerType;
use lsp::{LspManagerModel, LspManagerModelEvent, LspServerModel, LspState};
use pathfinder_color::ColorU;
#[cfg(not(target_family = "wasm"))]
use remote_server::codebase_index_proto::{RemoteCodebaseIndexState, RemoteCodebaseIndexStatus};
use galaxy_core::features::FeatureFlag;
use galaxy_core::report_if_error;
use galaxy_core::settings::ToggleableSetting as _;
@@ -36,6 +31,11 @@ use galaxyui::{
id, Action, AppContext, Entity, ModelHandle, SingletonEntity, TypedActionView, View,
ViewContext, ViewHandle,
};
use lsp::supported_servers::LSPServerType;
use lsp::{LspManagerModel, LspManagerModelEvent, LspServerModel, LspState};
use pathfinder_color::ColorU;
#[cfg(not(target_family = "wasm"))]
use remote_server::codebase_index_proto::{RemoteCodebaseIndexState, RemoteCodebaseIndexStatus};
#[cfg(feature = "local_fs")]
use super::features::external_editor::ExternalEditorView;
@@ -584,10 +584,8 @@ impl CustomEndpointModal {
EditorEvent::Escape => {
self.cancel(ctx);
}
EditorEvent::Edited(_) => {
if !self.validate_url_field(ctx) {
ctx.notify();
}
EditorEvent::Edited(_) if !self.validate_url_field(ctx) => {
ctx.notify();
}
_ => {}
}
@@ -4,7 +4,6 @@ use std::path::{Path, PathBuf};
use ai::index::full_source_code_embedding::manager::{
CodebaseIndexManager, CodebaseIndexManagerEvent,
};
use settings::Setting;
use galaxy_util::path::user_friendly_path;
use galaxyui::elements::{
Border, ChildView, ConstrainedBox, Container, CrossAxisAlignment, Flex, Hoverable,
@@ -14,6 +13,7 @@ use galaxyui::platform::Cursor;
use galaxyui::{
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
use settings::Setting;
use crate::ai::persisted_workspace::{PersistedWorkspace, PersistedWorkspaceEvent};
use crate::appearance::Appearance;
@@ -306,7 +306,7 @@ fn compute_candidate_paths(
let mut seen_keys = HashSet::new();
let mut candidates: Vec<(String, PathBuf)> = Vec::new();
for path in indexed_paths.into_iter().chain(persisted_paths.into_iter()) {
for path in indexed_paths.into_iter().chain(persisted_paths) {
if !path_exists(&path) {
continue;
}
+2 -2
View File
@@ -1,7 +1,5 @@
use std::collections::HashMap;
use instant::Instant;
use pathfinder_geometry::vector::vec2f;
use galaxy_core::ui::color::blend::Blend;
use galaxy_core::ui::theme::color::internal_colors;
use galaxy_editor::editor::NavigationKey;
@@ -22,6 +20,8 @@ use galaxyui::{
AppContext, Entity, FocusContext, ModelHandle, SingletonEntity, TypedActionView, View,
ViewContext, ViewHandle,
};
use instant::Instant;
use pathfinder_geometry::vector::vec2f;
use super::agent_assisted_environment_modal::{
AgentAssistedEnvironmentModal, AgentAssistedEnvironmentModalEvent,
@@ -2,8 +2,9 @@ use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use ai::index::full_source_code_embedding::manager::CodebaseIndexManager;
use instant::Instant;
use chrono::{Duration, Utc};
use galaxy_core::ui::appearance::Appearance;
use instant::Instant;
use warpui::elements::Empty;
use warpui::platform::WindowStyle;
use warpui::{App, AppContext, Element, Entity, TypedActionView, View, WindowId};
@@ -1402,7 +1403,6 @@ fn test_render_environment_card_with_last_used_never() {
#[test]
fn test_render_environment_card_with_last_used_timestamp() {
App::test((), |mut app| async move {
app.add_singleton_model(|_| Appearance::mock());
@@ -1,7 +1,7 @@
use std::path::PathBuf;
use uuid::Uuid;
use galaxy_core::features::FeatureFlag;
use uuid::Uuid;
use warpui::elements::{
ConstrainedBox, Container, CrossAxisAlignment, Flex, MainAxisAlignment, MainAxisSize,
ParentElement, Shrinkable, Text, Wrap,
@@ -1,12 +1,12 @@
use std::cell::RefCell;
use std::collections::HashMap;
use settings::{Setting, ToggleableSetting};
use galaxy_core::features::FeatureFlag;
use galaxyui::elements::{Flex, MouseStateHandle, ParentElement};
use galaxyui::ui_components::components::UiComponent;
use galaxyui::ui_components::switch::SwitchStateHandle;
use galaxyui::{Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle};
use settings::{Setting, ToggleableSetting};
use crate::appearance::Appearance;
use crate::server::telemetry::TelemetryEvent;
+1 -1
View File
@@ -2,7 +2,6 @@ use std::cell::RefCell;
use std::collections::HashMap;
use std::time::Duration;
use settings::{Setting, ToggleableSetting};
use galaxyui::elements::{
Container, CrossAxisAlignment, Flex, MainAxisAlignment, MouseStateHandle, ParentElement, Text,
};
@@ -11,6 +10,7 @@ use galaxyui::ui_components::switch::SwitchStateHandle;
use galaxyui::{
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
use settings::{Setting, ToggleableSetting};
use crate::appearance::Appearance;
use crate::editor::{self, EditorView, SingleLineEditorOptions, TextOptions};
@@ -1,8 +1,8 @@
use itertools::Itertools;
use galaxyui::elements::{Container, CrossAxisAlignment, Flex, ParentElement, Shrinkable};
use galaxyui::presenter::ChildView;
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
use galaxyui::{Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle};
use itertools::Itertools;
use crate::appearance::Appearance;
use crate::editor::{EditorView, Event as EditorEvent, SingleLineEditorOptions, TextOptions};
+2 -2
View File
@@ -4,8 +4,6 @@ use std::sync::{Arc, Mutex};
use std::time::Duration;
use ::settings::{Setting, ToggleableSetting};
use lazy_static::lazy_static;
use strum::IntoEnumIterator;
use galaxy_core::channel::ChannelState;
use galaxy_core::context_flag::ContextFlag;
use galaxy_core::semantic_selection::{
@@ -26,6 +24,8 @@ use galaxyui::{
Action, AppContext, DisplayIdx, Entity, EventContext, ModelHandle, SingletonEntity, Tracked,
TypedActionView, View, ViewContext, ViewHandle, WindowId,
};
use lazy_static::lazy_static;
use strum::IntoEnumIterator;
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
use {
crate::settings::ForceX11, crate::settings::LinuxAppConfiguration,
+1 -1
View File
@@ -1,6 +1,5 @@
use std::collections::HashMap;
use itertools::Itertools;
use galaxy_core::ui::theme::color::internal_colors;
use galaxyui::elements::{
Align, Border, ClippedScrollStateHandle, ClippedScrollable, ConstrainedBox, Container,
@@ -16,6 +15,7 @@ use galaxyui::units::Pixels;
use galaxyui::{
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
use itertools::Itertools;
use super::settings_page::{
render_sub_header, LocalOnlyIconState, MatchData, PageType, SettingsPageMeta,
+8 -6
View File
@@ -1,9 +1,6 @@
use std::sync::{Arc, Mutex};
use ::settings::{Setting, ToggleableSetting};
use lazy_static::lazy_static;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use galaxy_core::channel::ChannelState;
use galaxy_core::context_flag::ContextFlag;
use galaxy_core::features::FeatureFlag;
@@ -26,6 +23,9 @@ use galaxyui::{
id, Action, AppContext, Entity, ModelHandle, SingletonEntity, TypedActionView, View,
ViewContext, ViewHandle,
};
use lazy_static::lazy_static;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use super::settings_page::{
render_body_item, render_customer_type_badge, AdditionalInfo, LocalOnlyIconState, MatchData,
@@ -141,9 +141,11 @@ impl MainPageAction {
impl From<&MainPageAction> for LoginGatedFeature {
fn from(val: &MainPageAction) -> LoginGatedFeature {
match val {
Upgrade { .. } => "Upgrade Plan",
GenerateStripeBillingPortalLink { .. } => "Generate Stripe Billing Portal Link",
ToggleSettingsSync => "Toggle Settings Sync",
MainPageAction::Upgrade { .. } => "Upgrade Plan",
MainPageAction::GenerateStripeBillingPortalLink { .. } => {
"Generate Stripe Billing Portal Link"
}
MainPageAction::ToggleSettingsSync => "Toggle Settings Sync",
_ => "Unknown reason",
}
}
@@ -6,11 +6,6 @@ use std::sync::Arc;
#[cfg(feature = "local_fs")]
#[cfg(not(target_family = "wasm"))]
use diesel::SqliteConnection;
#[cfg(feature = "local_fs")]
use parking_lot::Mutex;
use pathfinder_geometry::vector::vec2f;
use settings::Setting as _;
use uuid::Uuid;
use galaxy_core::send_telemetry_from_ctx;
use galaxy_core::ui::appearance::Appearance;
use galaxy_core::ui::theme::color::internal_colors;
@@ -26,8 +21,13 @@ use galaxyui::ui_components::components::UiComponent;
use galaxyui::{
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
#[cfg(not(target_family = "wasm"))]
#[cfg(feature = "local_fs")]
use parking_lot::Mutex;
use pathfinder_geometry::vector::vec2f;
use settings::Setting as _;
use uuid::Uuid;
#[cfg(not(target_family = "wasm"))]
use crate::ai::blocklist::secret_redaction::find_secrets_in_text;
use crate::ai::mcp::parsing::{prettify_json, resolve_json, ParsedTemplatableMCPServerResult};
use crate::ai::mcp::templatable::CloudTemplatableMCPServer;
@@ -1,8 +1,8 @@
use std::collections::HashMap;
use markdown_parser::parse_markdown;
use galaxy_core::ui::external_product_icon::ExternalProductIcon;
use galaxy_core::ui::icons::Icon;
use markdown_parser::parse_markdown;
use warpui::elements::{
Align, Border, ChildView, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Empty,
Flex, FormattedTextElement, HighlightedHyperlink, Hoverable, MainAxisAlignment,
@@ -2,15 +2,15 @@ use std::cmp::Ordering;
use std::collections::HashMap;
use std::path::PathBuf;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use settings::ToggleableSetting as _;
use strum::IntoEnumIterator;
use uuid::Uuid;
use galaxy_core::features::FeatureFlag;
use galaxy_core::send_telemetry_from_ctx;
use galaxy_core::ui::appearance::AppearanceEvent;
use galaxy_core::ui::theme::color::internal_colors;
use galaxy_core::ui::Icon;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use settings::ToggleableSetting as _;
use strum::IntoEnumIterator;
use uuid::Uuid;
use warpui::elements::{
Align, Border, ChildView, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment,
Expanded, Fill, Flex, FormattedTextElement, HighlightedHyperlink, MainAxisAlignment,
@@ -1,5 +1,3 @@
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use pathfinder_color::ColorU;
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::external_product_icon::ExternalProductIcon;
use galaxy_core::ui::icons::{Icon, ICON_DIMENSIONS};
@@ -18,6 +16,8 @@ use galaxyui::ui_components::chip::Chip;
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
use galaxyui::ui_components::switch::SwitchStateHandle;
use galaxyui::{AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext};
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use pathfinder_color::ColorU;
use crate::ai::mcp::templatable::CloudTemplatableMCPServer;
use crate::ai::mcp::{MCPServerState, TemplatableMCPServerManager};
@@ -1,8 +1,8 @@
use chrono::{Local, TimeZone};
use uuid::Uuid;
use galaxy_core::ui::external_product_icon::ExternalProductIcon;
use galaxy_core::ui::icons::Icon;
use galaxy_core::ui::theme::color::internal_colors;
use uuid::Uuid;
use warpui::elements::{
Align, Border, ChildView, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Empty,
Flex, Hoverable, MainAxisAlignment, MouseStateHandle, Padding, ParentElement, Radius,
+1 -1
View File
@@ -1,11 +1,11 @@
use std::collections::HashMap;
use uuid::Uuid;
use galaxyui::elements::{ChildView, Container};
use galaxyui::ui_components::components::{Coords, UiComponentStyles};
use galaxyui::{
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
use uuid::Uuid;
use crate::ai::mcp::gallery::MCPGalleryManager;
use crate::ai::mcp::templatable_installation::VariableValue;
+23 -46
View File
@@ -10,6 +10,26 @@ use billing_and_usage_page::BillingAndUsagePageEvent;
use code_page::{CodeSettingsPageAction, CodeSettingsPageEvent, CodeSubpage};
use environments_page::EnvironmentsPageView;
use features_page::{FeaturesPageView, FeaturesSettingsPageEvent};
use galaxy_core::channel::ChannelState;
use galaxy_core::context_flag::ContextFlag;
use galaxy_core::features::FeatureFlag;
use galaxy_core::send_telemetry_from_ctx;
use galaxy_core::settings::ToggleableSetting as _;
use galaxy_core::ui::theme::color::internal_colors;
use galaxy_editor::editor::NavigationKey;
use galaxyui::elements::{
Align, Border, ChildAnchor, ChildView, Clipped, ClippedScrollStateHandle, ClippedScrollable,
ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, DispatchEventResult, Empty,
EventHandler, Expanded, Fill, Flex, MainAxisSize, OffsetPositioning, ParentAnchor,
ParentElement, ParentOffsetBounds, Radius, SavePosition, ScrollbarWidth, Shrinkable, Stack,
Text,
};
use galaxyui::fonts::{Properties, Weight};
use galaxyui::keymap::{ContextPredicate, EnabledPredicate, FixedBinding};
use galaxyui::{
id, Action, AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView,
UpdateView as _, View, ViewContext, ViewHandle,
};
use itertools::Itertools as _;
use keybindings::KeybindingsView;
use main_page::{MainPageAction, MainSettingsPageEvent, MainSettingsPageView};
@@ -26,27 +46,7 @@ use settings_page::{
};
use show_blocks_view::{ShowBlocksEvent, ShowBlocksView};
use teams_page::{TeamsPageView, TeamsPageViewEvent};
use galaxy_core::channel::ChannelState;
use galaxy_core::context_flag::ContextFlag;
use galaxy_core::features::FeatureFlag;
use galaxy_core::send_telemetry_from_ctx;
use galaxy_core::settings::ToggleableSetting as _;
use galaxy_core::ui::theme::color::internal_colors;
use galaxy_editor::editor::NavigationKey;
use warpify_page::{WarpifyPageAction, WarpifyPageView};
use galaxyui::elements::{
Align, Border, ChildAnchor, ChildView, Clipped, ClippedScrollStateHandle, ClippedScrollable,
ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, DispatchEventResult, Empty,
EventHandler, Expanded, Fill, Flex, MainAxisSize, OffsetPositioning, ParentAnchor,
ParentElement, ParentOffsetBounds, Radius, SavePosition, ScrollbarWidth, Shrinkable, Stack,
Text,
};
use galaxyui::fonts::{Properties, Weight};
use galaxyui::keymap::{ContextPredicate, EnabledPredicate, FixedBinding};
use galaxyui::{
id, Action, AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView,
UpdateView as _, View, ViewContext, ViewHandle,
};
use self::telemetry::SettingsTelemetryEvent;
use crate::ai::custom_model_routers::CustomModelRouter;
@@ -285,12 +285,6 @@ pub enum SettingsSection {
CloudEnvironments,
#[allow(dead_code)]
OzCloudAPIKeys,
#[allow(dead_code)]
Teams,
#[allow(dead_code)]
SharedBlocks,
#[allow(dead_code)]
Referrals,
}
use std::fmt::{self, Display};
@@ -410,9 +404,7 @@ impl FromStr for SettingsSection {
"Editor and Code Review" | "EditorAndCodeReview" => Ok(Self::EditorAndCodeReview),
"CloudEnvironments" | "Environments" => Ok(Self::CloudEnvironments),
"OzCloudAPIKeys" => Ok(Self::OzCloudAPIKeys),
"Teams" => Ok(Self::Teams),
"SharedBlocks" | "Shared Blocks" => Ok(Self::SharedBlocks),
"Referrals" => Ok(Self::Referrals),
_ => Err(()),
}
}
@@ -1186,12 +1178,6 @@ impl SettingsView {
me.handle_ai_page_event(event, ctx);
});
// Environments page
let environments_page_handle = ctx.add_typed_action_view(EnvironmentsPageView::new);
ctx.subscribe_to_view(&environments_page_handle, |me, _, event, ctx| {
me.handle_environments_page_event(event, ctx);
});
// Billing & Usage page (internally, this routes to the v1 or v2 version. Depending on FFs and current plan).
let billing_and_usage_handle = ctx.add_view(BillingAndUsageDispatchView::new);
ctx.subscribe_to_view(&billing_and_usage_handle, |me, _, event, ctx| {
@@ -1220,12 +1206,6 @@ impl SettingsView {
me.handle_privacy_page_event(event, ctx);
});
let referrals_client = ServerApiProvider::as_ref(ctx).get_referrals_client();
let referrals_page_handle =
ctx.add_typed_action_view(|ctx| ReferralsPageView::new(referrals_client, ctx));
ctx.subscribe_to_view(&referrals_page_handle, |me, _, event, ctx| {
me.handle_referrals_page_event(event, ctx);
});
let scripting_page_handle = if FeatureFlag::WarpControlCli.is_enabled() {
Some(ctx.add_typed_action_view(ScriptingSettingsPageView::new))
} else {
@@ -2187,12 +2167,9 @@ impl SettingsView {
fn input_tab(&mut self, ctx: &mut ViewContext<Self>) {
if let Some(current_page) = self.current_settings_page() {
match &current_page.view_handle {
SettingsPageViewHandle::Keybindings(view_handle) => {
view_handle.update(ctx, |view, ctx| view.on_tab_pressed(ctx));
}
_ => (),
};
if let SettingsPageViewHandle::Keybindings(view_handle) = &current_page.view_handle {
view_handle.update(ctx, |view, ctx| view.on_tab_pressed(ctx));
}
}
}
@@ -1,6 +1,6 @@
#![allow(dead_code)]
use chrono::Utc;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use pathfinder_geometry::vector::vec2f;
use galaxy_core::features::FeatureFlag;
use galaxy_server_client::auth::AgentIdentity;
use galaxyui::elements::{
@@ -17,6 +17,8 @@ use galaxyui::ui_components::segmented_control::{
use galaxyui::{
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use pathfinder_geometry::vector::vec2f;
use crate::appearance::Appearance;
use crate::editor::{
+6 -2
View File
@@ -1,7 +1,8 @@
#![allow(dead_code)]
use std::collections::HashMap;
use chrono::{DateTime, Utc};
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use galaxy_core::features::FeatureFlag;
use galaxy_graphql::object_permissions::OwnerType;
use galaxy_graphql::queries::api_keys::ApiKeyProperties as GqlApiKeyProperties;
@@ -15,7 +16,10 @@ use galaxyui::fonts::{Properties, Weight};
use galaxyui::text_layout::ClipConfig;
use galaxyui::ui_components::button::ButtonVariant;
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
use galaxyui::{AppContext, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle};
use galaxyui::{
AppContext, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use super::platform::{
CreateApiKeyModal, CreateApiKeyModalEvent, CreateApiKeyModalViewState, ExpireApiKeyButton,
@@ -1,4 +1,3 @@
use regex::Regex;
use galaxy_editor::editor::NavigationKey;
use galaxyui::elements::{
ChildView, Container, CrossAxisAlignment, Empty, Expanded, Flex, MainAxisSize,
@@ -9,6 +8,7 @@ use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles
use galaxyui::{
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
use regex::Regex;
use crate::appearance::Appearance;
use crate::editor::{
+15 -4
View File
@@ -4,13 +4,10 @@ use std::collections::{HashMap, HashSet};
use std::sync::LazyLock;
use std::time::Duration;
use pathfinder_geometry::vector::vec2f;
use regex::Regex;
use settings::Setting as _;
use galaxy_core::context_flag::ContextFlag;
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::theme::color::internal_colors;
use galaxy_core::ui::theme::WarpTheme;
use galaxy_core::ui::theme::GalaxyTheme;
use galaxyui::elements::{
Align, ChildAnchor, ChildView, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment,
Empty, Expanded, Flex, Hoverable, MainAxisAlignment, MainAxisSize, MouseStateHandle,
@@ -28,6 +25,9 @@ use galaxyui::{
id, Action, AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView,
UpdateModel, View, ViewContext, ViewHandle,
};
use pathfinder_geometry::vector::vec2f;
use regex::Regex;
use settings::Setting as _;
use super::privacy::{AddRegexModal, AddRegexModalEvent};
use super::settings_page::{
@@ -461,6 +461,7 @@ pub enum PrivacyPageAction {
ShowAddRegexModal,
AddRecommendedRegex(usize),
SwitchSecretRedactionTab(SecretRedactionTab),
ToggleCloudConversationStorage,
}
#[derive(Clone, Copy, Debug, PartialEq)]
@@ -534,6 +535,16 @@ impl TypedActionView for PrivacyPageView {
}
PrivacyPageAction::ToggleTelemetry => self.toggle_telemetry(ctx),
PrivacyPageAction::ToggleCrashReporting => self.toggle_crash_reporting(ctx),
PrivacyPageAction::ToggleCloudConversationStorage => {
let handle = PrivacySettings::handle(ctx);
ctx.update_model(&handle, |settings, ctx| {
settings.set_is_cloud_conversation_storage_enabled(
!settings.is_cloud_conversation_storage_enabled,
ctx,
);
});
ctx.notify();
}
PrivacyPageAction::LaunchNetworkLogging => self.launch_network_logging(ctx),
PrivacyPageAction::RemoveCustomRegex(idx) => {
self.queue_regex_removal(*idx, ctx);
+9 -7
View File
@@ -1,6 +1,15 @@
#![allow(dead_code)]
use std::ops::Deref;
use std::sync::Arc;
use galaxyui::fonts::Weight;
use galaxyui::ui_components::button::ButtonVariant;
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
use galaxyui::{
AppContext, Entity, EventContext, FocusContext, SingletonEntity, TypedActionView, View,
ViewContext, ViewHandle,
};
use lazy_static::lazy_static;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use pathfinder_color::ColorU;
@@ -13,13 +22,6 @@ use warpui::elements::{
Flex, FormattedTextElement, HighlightedHyperlink, Icon, MainAxisSize, MouseStateHandle,
ParentElement, Radius, Rect, Shrinkable,
};
use galaxyui::fonts::Weight;
use galaxyui::ui_components::button::ButtonVariant;
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
use galaxyui::{
AppContext, Entity, EventContext, FocusContext, SingletonEntity, TypedActionView, View,
ViewContext, ViewHandle,
};
use super::settings_page::{
MatchData, PageType, SettingsPageMeta, SettingsPageViewHandle, SettingsWidget, PAGE_PADDING,
+1 -1
View File
@@ -2,9 +2,9 @@
use std::cell::RefCell;
use std::collections::HashMap;
use settings::Setting as _;
#[cfg(target_os = "macos")]
use galaxy_core::channel::ChannelState;
use settings::Setting as _;
use warpui::elements::{ChildView, Element, MouseStateHandle};
#[cfg(target_os = "macos")]
use warpui::ui_components::button::ButtonVariant;
@@ -7,7 +7,6 @@
//! `Workspace::render_settings_error_banner`) when the settings file has an
//! error *and* the user has dismissed the workspace banner.
//! * Otherwise, a plain bordered "Open settings file" button.
use pathfinder_color::ColorU;
use galaxy_core::ui::color::coloru_with_opacity;
use galaxy_core::ui::theme::Fill;
use galaxyui::elements::{
@@ -18,6 +17,7 @@ use galaxyui::elements::{
};
use galaxyui::fonts::{FamilyId, Properties, Weight};
use galaxyui::platform::Cursor;
use pathfinder_color::ColorU;
use crate::appearance::Appearance;
use crate::settings::SettingsFileError;
+4 -5
View File
@@ -2,10 +2,6 @@ use core::fmt::{self, Display};
use std::borrow::Cow;
use std::collections::HashMap;
use itertools::Itertools as _;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use settings::Setting;
use galaxy_core::settings::SyncToCloud;
use galaxy_core::ui::color::blend::Blend;
use galaxy_core::ui::theme::color::internal_colors;
@@ -25,6 +21,10 @@ use galaxyui::ui_components::button::{Button, ButtonVariant};
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
use galaxyui::units::Pixels;
use galaxyui::{Action, AppContext, SingletonEntity, ViewContext, ViewHandle};
use itertools::Itertools as _;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use settings::Setting;
use super::about_page::AboutPageView;
use super::ai_page::{AISettingsPageAction, AISettingsPageView};
@@ -115,7 +115,6 @@ pub enum SettingsPageViewHandle {
BillingAndUsage(ViewHandle<BillingAndUsageDispatchView>),
MCPServers(ViewHandle<MCPServersSettingsPageView>),
WarpDrive(ViewHandle<WarpDriveSettingsPageView>),
CloudEnvironments(ViewHandle<EnvironmentsPageView>),
OzCloudAPIKeys(ViewHandle<super::platform_page::PlatformPageView>),
Teams(ViewHandle<super::teams_page::TeamsPageView>),
SharedBlocks(ViewHandle<ShowBlocksView>),
+4 -2
View File
@@ -1,8 +1,9 @@
#![allow(dead_code)]
use std::sync::Arc;
use anyhow::Result;
use chrono::{DateTime, FixedOffset, Local};
use pathfinder_geometry::vector::vec2f;
use galaxy_core::ui::theme::color::internal_colors;
use galaxyui::clipboard::ClipboardContent;
use galaxyui::color::ColorU;
@@ -19,6 +20,7 @@ use galaxyui::ui_components::components::{UiComponent, UiComponentStyles};
use galaxyui::{
AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
use pathfinder_geometry::vector::vec2f;
use super::settings_page::{
render_page_title, MatchData, PageType, SettingsPageMeta, SettingsPageViewHandle,
@@ -475,7 +477,7 @@ impl ShowBlocksView {
) {
match result {
Ok(mut blocks) => {
blocks.sort_by(|b1, b2| b2.time_started.cmp(&b1.time_started));
blocks.sort_by_key(|b| std::cmp::Reverse(b.time_started));
self.get_blocks_for_user_status = GetBlocksForUserRequestState::Done(blocks)
}
+1 -1
View File
@@ -1,7 +1,7 @@
use galaxyui::ui_components::button::ButtonVariant;
use std::fmt::Display;
use galaxyui::elements::MouseStateHandle;
use galaxyui::ui_components::button::ButtonVariant;
use galaxyui::ui_components::components::{UiComponent, UiComponentStyles};
use galaxyui::Element;
+10 -8
View File
@@ -1,18 +1,13 @@
#![allow(dead_code)]
use core::default::Default;
use std::cmp::Ordering;
use std::collections::HashSet;
use std::sync::Arc;
use email_address::EmailAddress;
use galaxy_core::ui::theme::color::internal_colors;
use galaxyui::FocusContext;
use itertools::Itertools;
use lazy_static::lazy_static;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use regex::Regex;
use serde::{Deserialize, Serialize};
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::theme::color::internal_colors;
use galaxyui::clipboard::ClipboardContent;
use galaxyui::elements::{
Align, Border, ChildAnchor, ClippedScrollStateHandle, ConstrainedBox, Container, CornerRadius,
@@ -31,6 +26,12 @@ use galaxyui::{
AppContext, Entity, FocusContext, ModelHandle, SingletonEntity, TypedActionView, View,
ViewContext, ViewHandle,
};
use itertools::Itertools;
use lazy_static::lazy_static;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::vec2f;
use regex::Regex;
use serde::{Deserialize, Serialize};
use super::admin_actions::AdminActions;
use super::settings_page::{
@@ -240,6 +241,7 @@ impl TeamsPageAction {
impl From<&TeamsPageAction> for LoginGatedFeature {
fn from(val: &TeamsPageAction) -> LoginGatedFeature {
use TeamsPageAction::*;
match val {
LeaveTeam => "Leave Team",
ShowDeleteTeamConfirmationDialog => "Delete Team",
@@ -1,3 +1,5 @@
#![allow(dead_code)]
use galaxyui::elements::{
Align, Container, CrossAxisAlignment, Flex, MouseStateHandle, ParentElement, Text,
};
@@ -1,9 +1,6 @@
#[cfg(not(target_family = "wasm"))]
use std::collections::HashMap;
use instant::{Duration, Instant};
use log::debug;
use url::Url;
use galaxy_core::send_telemetry_from_ctx;
use galaxy_editor::editor::NavigationKey;
use galaxy_graphql::queries::user_github_info::UserGithubInfoResult;
@@ -25,8 +22,11 @@ use galaxyui::{
AppContext, Entity, FocusContext, SingletonEntity, TypedActionView, View, ViewContext,
ViewHandle,
};
#[cfg(not(target_family = "wasm"))]
use instant::{Duration, Instant};
use log::debug;
use url::Url;
#[cfg(not(target_family = "wasm"))]
use super::editor_text_colors;
use super::settings_page::{render_input_list, InputListItem};
use crate::ai::ambient_agents::github_auth_notifier::{GitHubAuthEvent, GitHubAuthNotifier};
@@ -1,4 +1,3 @@
use url::Url;
use galaxy_core::ui::appearance::Appearance;
use galaxyui::elements::{Empty, MouseStateHandle};
use galaxyui::platform::WindowStyle;
@@ -6,6 +5,7 @@ use galaxyui::{
AddSingletonModel, App, AppContext, Element, Entity, SingletonEntity, TypedActionView, View,
WindowId,
};
use url::Url;
use super::{
EnvironmentFormCopy, EnvironmentFormInitArgs, EnvironmentFormValues, SuggestImageState,
+3 -3
View File
@@ -1,9 +1,6 @@
use galaxy_core::features::FeatureFlag;
use galaxy_core::report_if_error;
use galaxy_core::settings::ToggleableSetting as _;
use warpui::elements::{
Container, Element, Flex, MouseStateHandle, ParentElement, Shrinkable, Text,
};
use galaxyui::fonts::Weight;
use galaxyui::keymap::ContextPredicate;
use galaxyui::ui_components::button::ButtonVariant;
@@ -12,6 +9,9 @@ use galaxyui::ui_components::switch::SwitchStateHandle;
use galaxyui::{
id, Action, AppContext, Entity, SingletonEntity, TypedActionView, View, ViewContext, ViewHandle,
};
use warpui::elements::{
Container, Element, Flex, MouseStateHandle, ParentElement, Shrinkable, Text,
};
use super::settings_page::{
render_body_item, AdditionalInfo, MatchData, PageType, SettingsPageMeta,
+4 -4
View File
@@ -2,10 +2,6 @@ use std::cell::RefCell;
use std::collections::HashMap;
use std::fmt::Display;
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use regex::Regex;
use settings::{Setting, ToggleableSetting};
use strum::IntoEnumIterator;
use galaxy_core::features::FeatureFlag;
use galaxyui::elements::{
Container, Flex, FormattedTextElement, HighlightedHyperlink, MouseStateHandle, ParentElement,
@@ -18,6 +14,10 @@ use galaxyui::{
Action, AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView, View,
ViewContext, ViewHandle,
};
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use regex::Regex;
use settings::{Setting, ToggleableSetting};
use strum::IntoEnumIterator;
use super::settings_page::{
add_setting, render_alternating_color_list, render_body_item, render_dropdown_item,