Skip to content

Commit e0b89db

Browse files
committed
chore: bump lai
1 parent ac8141a commit e0b89db

19 files changed

Lines changed: 105 additions & 170 deletions

File tree

frontend/rust-lib/Cargo.lock

Lines changed: 69 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/rust-lib/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,6 @@ collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFl
152152
# To update the commit ID, run:
153153
# scripts/tool/update_local_ai_rev.sh new_rev_id
154154
# ⚠️⚠️⚠️️
155-
appflowy-local-ai = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "52ad76f21f8f3a7b510dae029836b5fe86479e5a" }
156-
appflowy-plugin = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "52ad76f21f8f3a7b510dae029836b5fe86479e5a" }
155+
af-local-ai = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "bcd9782fa3d6f6d36f2fa6d065e834a1400f156e" }
156+
af-plugin = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "bcd9782fa3d6f6d36f2fa6d065e834a1400f156e" }
157+
af-mcp = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "bcd9782fa3d6f6d36f2fa6d065e834a1400f156e" }

frontend/rust-lib/flowy-ai/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ flowy-error = { path = "../flowy-error", features = [
1212
"impl_from_dispatch_error",
1313
"impl_from_collab_folder",
1414
"impl_from_sqlite",
15+
"impl_from_appflowy_cloud",
1516
] }
1617
lib-dispatch = { workspace = true }
1718
tracing.workspace = true
@@ -34,8 +35,8 @@ serde_json = { workspace = true }
3435
anyhow = "1.0.86"
3536
tokio-stream = "0.1.15"
3637
tokio-util = { workspace = true, features = ["full"] }
37-
appflowy-local-ai = { version = "0.1.0", features = ["verbose"] }
38-
appflowy-plugin = { version = "0.1.0" }
38+
af-local-ai = { version = "0.1.0", features = ["verbose"] }
39+
af-plugin = { version = "0.1.0" }
3940
reqwest = { version = "0.11.27", features = ["json"] }
4041
sha2 = "0.10.7"
4142
base64 = "0.21.5"
@@ -50,7 +51,7 @@ collab-integrate.workspace = true
5051

5152
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
5253
notify = "6.1.1"
53-
mcp_daemon = "0.2.1"
54+
af-mcp = { version = "0.1.0" }
5455

5556
[target.'cfg(target_os = "windows")'.dependencies]
5657
winreg = "0.55"

frontend/rust-lib/flowy-ai/src/ai_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::middleware::chat_service_mw::AICloudServiceMiddleware;
88
use crate::persistence::{insert_chat, read_chat_metadata, ChatTable};
99
use std::collections::HashMap;
1010

11-
use appflowy_plugin::manager::PluginManager;
11+
use af_plugin::manager::PluginManager;
1212
use dashmap::DashMap;
1313
use flowy_ai_pub::cloud::{AIModel, ChatCloudService, ChatSettings, UpdateChatParams};
1414
use flowy_error::{FlowyError, FlowyResult};

frontend/rust-lib/flowy-ai/src/entities.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use appflowy_plugin::core::plugin::RunningState;
1+
use af_plugin::core::plugin::RunningState;
22
use std::collections::HashMap;
33

44
use crate::local_ai::controller::LocalAISetting;

frontend/rust-lib/flowy-ai/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ mod chat;
66
mod completion;
77
pub mod entities;
88
mod local_ai;
9-
mod mcp;
9+
10+
#[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))]
11+
pub mod mcp;
12+
1013
mod middleware;
1114
pub mod notification;
1215
mod persistence;

frontend/rust-lib/flowy-ai/src/local_ai/controller.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use crate::local_ai::resource::{LLMResourceService, LocalAIResourceController};
44
use crate::notification::{
55
chat_notification_builder, ChatNotification, APPFLOWY_AI_NOTIFICATION_KEY,
66
};
7+
use af_plugin::manager::PluginManager;
78
use anyhow::Error;
8-
use appflowy_plugin::manager::PluginManager;
99
use flowy_ai_pub::cloud::{ChatCloudService, ChatMessageMetadata, ContextLoader, LocalAIConfig};
1010
use flowy_error::{FlowyError, FlowyResult};
1111
use flowy_sqlite::kv::KVStorePreferences;
@@ -15,8 +15,8 @@ use std::collections::HashMap;
1515

1616
use crate::local_ai::watch::is_plugin_ready;
1717
use crate::stream_message::StreamMessage;
18-
use appflowy_local_ai::ollama_plugin::OllamaAIPlugin;
19-
use appflowy_plugin::core::plugin::RunningState;
18+
use af_local_ai::ollama_plugin::OllamaAIPlugin;
19+
use af_plugin::core::plugin::RunningState;
2020
use arc_swap::ArcSwapOption;
2121
use futures_util::SinkExt;
2222
use lib_infra::util::get_operating_system;
@@ -46,7 +46,7 @@ impl Default for LocalAISetting {
4646
}
4747
}
4848

49-
const LOCAL_AI_SETTING_KEY: &str = "appflowy_local_ai_setting:v1";
49+
const LOCAL_AI_SETTING_KEY: &str = "af_local_ai_setting:v1";
5050

5151
pub struct LocalAIController {
5252
ai_plugin: Arc<OllamaAIPlugin>,

frontend/rust-lib/flowy-ai/src/local_ai/resource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::local_ai::watch::{watch_offline_app, WatchContext};
1111
use crate::notification::{
1212
chat_notification_builder, ChatNotification, APPFLOWY_AI_NOTIFICATION_KEY,
1313
};
14-
use appflowy_local_ai::ollama_plugin::OllamaPluginConfig;
14+
use af_local_ai::ollama_plugin::OllamaPluginConfig;
1515
use lib_infra::util::{get_operating_system, OperatingSystem};
1616
use reqwest::Client;
1717
use serde::Deserialize;

frontend/rust-lib/flowy-ai/src/local_ai/stream_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use appflowy_plugin::error::PluginError;
1+
use af_plugin::error::PluginError;
22

33
use flowy_ai_pub::cloud::QuestionStreamValue;
44
use flowy_error::FlowyError;

frontend/rust-lib/flowy-ai/src/local_ai/watch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub(crate) fn ollama_plugin_path() -> std::path::PathBuf {
101101
// Use LOCALAPPDATA for a user-specific installation path on Windows.
102102
let local_appdata =
103103
std::env::var("LOCALAPPDATA").unwrap_or_else(|_| "C:\\Program Files".to_string());
104-
std::path::PathBuf::from(local_appdata).join("Programs\\appflowy_plugin\\af_ollama_plugin.exe")
104+
std::path::PathBuf::from(local_appdata).join("Programs\\af_plugin\\af_ollama_plugin.exe")
105105
}
106106

107107
#[cfg(target_os = "macos")]

0 commit comments

Comments
 (0)