chore: bump local ai

This commit is contained in:
Nathan 2025-03-28 23:00:27 +08:00
parent 671e855b0e
commit fbf031b06d
3 changed files with 13 additions and 12 deletions

View File

@ -345,7 +345,7 @@ dependencies = [
[[package]] [[package]]
name = "af-local-ai" name = "af-local-ai"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-LocalAI?rev=94913c8fb922047f52c6d01d0e16413ce25c970f#94913c8fb922047f52c6d01d0e16413ce25c970f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-LocalAI?rev=dd7002f75a981a3ce0d5456eb7dac9ca0bb88a5e#dd7002f75a981a3ce0d5456eb7dac9ca0bb88a5e"
dependencies = [ dependencies = [
"af-plugin", "af-plugin",
"anyhow", "anyhow",
@ -365,7 +365,7 @@ dependencies = [
[[package]] [[package]]
name = "af-mcp" name = "af-mcp"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-LocalAI?rev=94913c8fb922047f52c6d01d0e16413ce25c970f#94913c8fb922047f52c6d01d0e16413ce25c970f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-LocalAI?rev=dd7002f75a981a3ce0d5456eb7dac9ca0bb88a5e#dd7002f75a981a3ce0d5456eb7dac9ca0bb88a5e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures-util", "futures-util",
@ -379,7 +379,7 @@ dependencies = [
[[package]] [[package]]
name = "af-plugin" name = "af-plugin"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-LocalAI?rev=94913c8fb922047f52c6d01d0e16413ce25c970f#94913c8fb922047f52c6d01d0e16413ce25c970f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-LocalAI?rev=dd7002f75a981a3ce0d5456eb7dac9ca0bb88a5e#dd7002f75a981a3ce0d5456eb7dac9ca0bb88a5e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cfg-if", "cfg-if",

View File

@ -152,6 +152,6 @@ collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFl
# To update the commit ID, run: # To update the commit ID, run:
# scripts/tool/update_local_ai_rev.sh new_rev_id # scripts/tool/update_local_ai_rev.sh new_rev_id
# ⚠️⚠️⚠️️ # ⚠️⚠️⚠️️
af-local-ai = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "94913c8fb922047f52c6d01d0e16413ce25c970f" } af-local-ai = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "dd7002f75a981a3ce0d5456eb7dac9ca0bb88a5e" }
af-plugin = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "94913c8fb922047f52c6d01d0e16413ce25c970f" } af-plugin = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "dd7002f75a981a3ce0d5456eb7dac9ca0bb88a5e" }
af-mcp = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "94913c8fb922047f52c6d01d0e16413ce25c970f" } af-mcp = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-LocalAI", rev = "dd7002f75a981a3ce0d5456eb7dac9ca0bb88a5e" }

View File

@ -98,16 +98,17 @@ impl LocalAIController {
if let Ok(workspace_id) = cloned_user_service.workspace_id() { if let Ok(workspace_id) = cloned_user_service.workspace_id() {
let key = local_ai_enabled_key(&workspace_id); let key = local_ai_enabled_key(&workspace_id);
info!("[AI Plugin] state: {:?}", state); info!("[AI Plugin] state: {:?}", state);
let new_state = RunningStatePB::from(state);
let enabled = cloned_store_preferences.get_bool(&key).unwrap_or(true);
let mut ready = false; let mut ready = false;
let mut lack_of_resource = None; let mut lack_of_resource = None;
if enabled { let enabled = cloned_store_preferences.get_bool(&key).unwrap_or(true);
ready = is_plugin_ready(); if !matches!(state, RunningState::UnexpectedStop { .. }) {
lack_of_resource = cloned_llm_res.get_lack_of_resource().await; if enabled {
ready = is_plugin_ready();
lack_of_resource = cloned_llm_res.get_lack_of_resource().await;
}
} }
let new_state = RunningStatePB::from(state);
chat_notification_builder( chat_notification_builder(
APPFLOWY_AI_NOTIFICATION_KEY, APPFLOWY_AI_NOTIFICATION_KEY,
ChatNotification::UpdateLocalAIState, ChatNotification::UpdateLocalAIState,