File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view
rust-lib/flowy-ai/src/local_ai Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import 'package:appflowy/workspace/presentation/settings/pages/setting_ai_view/m
66import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart' ;
77import 'package:flowy_infra/theme_extension.dart' ;
88import 'package:flowy_infra_ui/widget/spacing.dart' ;
9+ import 'package:flutter/foundation.dart' ;
910import 'package:flutter/material.dart' ;
1011
1112import 'package:appflowy/generated/locale_keys.g.dart' ;
@@ -147,7 +148,7 @@ class _LocalAIOnBoarding extends StatelessWidget {
147148 child: BlocBuilder <LocalAIOnBoardingBloc , LocalAIOnBoardingState >(
148149 builder: (context, state) {
149150 // Show the local AI settings if the user has purchased the AI Local plan
150- if (state.isPurchaseAILocal) {
151+ if (kDebugMode || state.isPurchaseAILocal) {
151152 return const LocalAISetting ();
152153 } else {
153154 if (member.role.isOwner) {
Original file line number Diff line number Diff line change @@ -326,9 +326,12 @@ impl LocalAIController {
326326 . store_preferences
327327 . get_bool ( APPFLOWY_LOCAL_AI_CHAT_ENABLED )
328328 . unwrap_or ( true ) ;
329- self . enable_chat_plugin ( chat_enabled) . await ?;
329+
330+ if self . local_ai_resource . is_resource_ready ( ) {
331+ self . enable_chat_plugin ( chat_enabled) . await ?;
332+ }
330333 } else {
331- self . enable_chat_plugin ( false ) . await ? ;
334+ let _ = self . enable_chat_plugin ( false ) . await ;
332335 }
333336 Ok ( enabled)
334337 }
You can’t perform that action at this time.
0 commit comments