Allow local AI without account signup
This commit is contained in:
@@ -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,60 +4234,6 @@ 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(),
|
||||
)
|
||||
.finish(),
|
||||
);
|
||||
} else {
|
||||
row.add_child(
|
||||
Container::new(
|
||||
ui_builder
|
||||
@@ -4312,7 +4248,6 @@ impl SettingsWidget for GlobalAIWidget {
|
||||
.with_padding_right(TOGGLE_BUTTON_RIGHT_PADDING)
|
||||
.finish(),
|
||||
);
|
||||
}
|
||||
|
||||
Container::new(row.finish())
|
||||
.with_padding_bottom(15.)
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user