Allow local AI without account signup

This commit is contained in:
2026-08-06 16:24:59 -05:00
parent a3c38c0f0b
commit 7ab381289e
2 changed files with 15 additions and 78 deletions
+13 -78
View File
@@ -20,7 +20,6 @@ use galaxyui::elements::{
use galaxyui::fonts::{Properties, Weight};
use galaxyui::keymap::{ContextPredicate, FixedBinding, Keystroke};
use galaxyui::platform::Cursor;
use galaxyui::ui_components::button::ButtonVariant;
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
use galaxyui::ui_components::slider::SliderStateHandle;
use galaxyui::ui_components::switch::{SwitchStateHandle, TooltipConfig};
@@ -3017,7 +3016,6 @@ pub enum AISettingsPageAction {
AddToMCPDenylist(uuid::Uuid),
RemoveFromMCPDenylist(uuid::Uuid),
CreateProfile,
SignupAnonymousUser,
ToggleBedrockEnabled,
ToggleOpenAIEnabled,
ConnectChatGPTSubscription,
@@ -3732,9 +3730,6 @@ impl TypedActionView for AISettingsPageView {
}
ctx.notify();
}
AISettingsPageAction::SignupAnonymousUser => {
ctx.emit(AISettingsPageEvent::SignupAnonymousUser);
}
AISettingsPageAction::ToggleCloudAgentComputerUse => {
AISettings::handle(ctx).update(ctx, |settings, ctx| {
report_if_error!(settings
@@ -4187,7 +4182,6 @@ fn render_ai_list(
#[derive(Default)]
struct GlobalAIWidget {
switch_state: SwitchStateHandle,
sign_up_button: MouseStateHandle,
}
impl SettingsWidget for GlobalAIWidget {
@@ -4208,10 +4202,6 @@ impl SettingsWidget for GlobalAIWidget {
let is_ai_disabled_due_to_remote_session_org_policy =
AISettings::as_ref(app).is_ai_disabled_due_to_remote_session_org_policy(app);
let is_anonymous = AuthStateProvider::as_ref(app)
.get()
.is_anonymous_or_logged_out();
let mut row = Flex::row()
.with_main_axis_size(MainAxisSize::Max)
.with_main_axis_alignment(MainAxisAlignment::SpaceBetween)
@@ -4244,75 +4234,20 @@ impl SettingsWidget for GlobalAIWidget {
);
}
// Show sign-up button for anonymous users, toggle for logged-in users
if is_anonymous {
row.add_child(
Flex::row()
.with_cross_axis_alignment(CrossAxisAlignment::Center)
.with_child(
Container::new(
Text::new_inline(
"To use AI features, please create an account.",
appearance.ui_font_family(),
14.,
)
.with_color(
appearance
.theme()
.sub_text_color(appearance.theme().surface_2())
.into_solid(),
)
.finish(),
)
.with_margin_right(16.)
.finish(),
)
.with_child(
Container::new(
ui_builder
.button(ButtonVariant::Accent, self.sign_up_button.clone())
.with_style(UiComponentStyles {
font_size: Some(14.),
font_weight: Some(Weight::Semibold),
border_radius: Some(CornerRadius::with_all(Radius::Pixels(4.))),
padding: Some(Coords {
top: 8.,
bottom: 8.,
left: 24.,
right: 24.,
}),
..Default::default()
})
.with_text_label("Sign up".to_owned())
.build()
.on_click(move |ctx, _, _| {
ctx.dispatch_typed_action(
AISettingsPageAction::SignupAnonymousUser,
);
})
.finish(),
)
.with_padding_right(TOGGLE_BUTTON_RIGHT_PADDING)
.finish(),
)
row.add_child(
Container::new(
ui_builder
.switch(self.switch_state.clone())
.check(AISettings::as_ref(app).is_any_ai_enabled(app))
.build()
.on_click(move |ctx, _, _| {
ctx.dispatch_typed_action(AISettingsPageAction::ToggleGlobalAI);
})
.finish(),
);
} else {
row.add_child(
Container::new(
ui_builder
.switch(self.switch_state.clone())
.check(AISettings::as_ref(app).is_any_ai_enabled(app))
.build()
.on_click(move |ctx, _, _| {
ctx.dispatch_typed_action(AISettingsPageAction::ToggleGlobalAI);
})
.finish(),
)
.with_padding_right(TOGGLE_BUTTON_RIGHT_PADDING)
.finish(),
);
}
)
.with_padding_right(TOGGLE_BUTTON_RIGHT_PADDING)
.finish(),
);
Container::new(row.finish())
.with_padding_bottom(15.)
+2
View File
@@ -405,6 +405,8 @@ metadata.
collapse behavior; shared/team folders retain the existing remote path.
- [x] Remove the account/signup gate from Galaxy Drive visibility and Settings controls so local
Drive remains usable while logged out; team-only actions retain their separate restrictions.
- [x] Remove the stale account/signup gate from the Global Agent control so configured local
providers and runtimes remain usable while logged out.
- [x] Move the retained Drive import flow onto local persistence for personal targets, including
local folder/notebook/workflow creation and progress reporting without remote `UpdateManager`
or `SyncQueue` dependencies; shared/team imports retain their remote path.