Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: update local ai crate

Nathan4e1a70c7aca2
diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/settings_ai_view.dart b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/settings_ai_view.dart
index 65ed04c0df..7102520ac1 100644
--- a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/settings_ai_view.dart
+++ b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/settings_ai_view.dart
@@ -1,11 +1,8 @@
import 'package:appflowy/generated/locale_keys.g.dart';
-import 'package:appflowy/shared/feature_flags.dart';
-import 'package:appflowy/workspace/application/settings/ai/local_ai_on_boarding_bloc.dart';
import 'package:appflowy/workspace/application/settings/ai/settings_ai_bloc.dart';
import 'package:appflowy/workspace/presentation/settings/pages/setting_ai_view/local_ai_setting.dart';
import 'package:appflowy/workspace/presentation/settings/pages/setting_ai_view/model_selection.dart';
import 'package:appflowy/workspace/presentation/settings/shared/settings_body.dart';
-import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart';
import 'package:appflowy/workspace/presentation/widgets/toggle/toggle.dart';
import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart';
import 'package:easy_localization/easy_localization.dart';
@@ -111,39 +108,3 @@ class _AISearchToggle extends StatelessWidget {
);
}
}
-
-// ignore: unused_element
-class _LocalAIOnBoarding extends StatelessWidget {
- const _LocalAIOnBoarding({
- required this.userProfile,
- required this.currentWorkspaceMemberRole,
- required this.workspaceId,
- });
- final UserProfilePB userProfile;
- final AFRolePB? currentWorkspaceMemberRole;
- final String workspaceId;
-
- @override
- Widget build(BuildContext context) {
- if (FeatureFlag.planBilling.isOn) {
- return BillingGateGuard(
- builder: (context) {
- return BlocProvider(
- create: (context) => LocalAIOnBoardingBloc(
- userProfile,
- currentWorkspaceMemberRole,
- workspaceId,
- )..add(const LocalAIOnBoardingEvent.started()),
- child: BlocBuilder<LocalAIOnBoardingBloc, LocalAIOnBoardingState>(
- builder: (context, state) {
- return const LocalAISetting();
- },
- ),
- );
- },
- );
- } else {
- return const SizedBox.shrink();
- }
- }
-}
diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock
index 3ed4794177..e687957458 100644
--- a/frontend/rust-lib/Cargo.lock
+++ b/frontend/rust-lib/Cargo.lock
@@ -198,7 +198,7 @@ dependencies = [
[[package]]
name = "appflowy-local-ai"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-LocalAI?rev=b1117aa0826be0fed1c543019a9f3187fb99b0e7#b1117aa0826be0fed1c543019a9f3187fb99b0e7"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-LocalAI?rev=48271d4a2d225ac0af141b87780bfd07d41ec4f2#48271d4a2d225ac0af141b87780bfd07d41ec4f2"
dependencies = [
"anyhow",
"appflowy-plugin",
@@ -218,7 +218,7 @@ dependencies = [
[[package]]
name = "appflowy-plugin"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-LocalAI?rev=b1117aa0826be0fed1c543019a9f3187fb99b0e7#b1117aa0826be0fed1c543019a9f3187fb99b0e7"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-LocalAI?rev=48271d4a2d225ac0af141b87780bfd07d41ec4f2#48271d4a2d225ac0af141b87780bfd07d41ec4f2"
dependencies = [
"anyhow",
"cfg-if",
diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml
index 9c17eb1d7c..c9c365d7f6 100644
--- a/frontend/rust-lib/Cargo.toml
+++ b/frontend/rust-lib/Cargo.toml
@@ -152,5 +152,5 @@ collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFl
# To update the commit ID, run:
# scripts/tool/update_local_ai_rev.sh new_rev_id
# ⚠️⚠️⚠️️
-appflowy-local-ai = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "b1117aa0826be0fed1c543019a9f3187fb99b0e7" }
-appflowy-plugin = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "b1117aa0826be0fed1c543019a9f3187fb99b0e7" }
+appflowy-local-ai = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "48271d4a2d225ac0af141b87780bfd07d41ec4f2" }
+appflowy-plugin = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "48271d4a2d225ac0af141b87780bfd07d41ec4f2" }
diff --git a/frontend/rust-lib/flowy-ai/src/local_ai/controller.rs b/frontend/rust-lib/flowy-ai/src/local_ai/controller.rs
index d5c346db07..c0475aa88f 100644
--- a/frontend/rust-lib/flowy-ai/src/local_ai/controller.rs
+++ b/frontend/rust-lib/flowy-ai/src/local_ai/controller.rs
@@ -27,7 +27,7 @@ use std::path::{Path, PathBuf};
use std::sync::Arc;
use tokio::select;
use tokio_stream::StreamExt;
-use tracing::{debug, error, info, instrument, trace, warn};
+use tracing::{debug, error, info, instrument, trace};
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct LocalAISetting {
@@ -193,14 +193,6 @@ impl LocalAIController {
/// AppFlowy store the value in local storage isolated by workspace id. Each workspace can have
/// different settings.
pub fn is_enabled(&self) -> bool {
- if !get_operating_system().is_desktop() {
- warn!(
- "[AI Plugin] unsupported platform when checking local ai is enabled: {:?}",
- get_operating_system()
- );
- return false;
- }
-
if let Ok(key) = self
.user_service
.workspace_id()