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.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
Merge branch 'main' into local_chat2
Nathane5b6393257fe
diff --cc frontend/rust-lib/Cargo.lockindex 342e454b9d,a84de4cdd6..8e46148ea9--- a/frontend/rust-lib/Cargo.lock+++ b/frontend/rust-lib/Cargo.lock@@@ -493,7 -493,7 +493,7 @@@ checksum = "dcfed56ad506cb2c684a14971b8[[package]]name = "app-error"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["anyhow","bincode",@@@ -513,7 -513,7 +513,7 @@@[[package]]name = "appflowy-ai-client"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["anyhow","bytes",@@@ -1159,7 -1159,7 +1159,7 @@@ dependencies =[[package]]name = "client-api"version = "0.2.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["again","anyhow",@@@ -1214,7 -1214,7 +1214,7 @@@[[package]]name = "client-api-entity"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["collab-entity","collab-rt-entity",@@@ -1227,7 -1227,7 +1227,7 @@@[[package]]name = "client-websocket"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["futures-channel","futures-util",@@@ -1499,7 -1499,7 +1499,7 @@@ dependencies =[[package]]name = "collab-rt-entity"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["anyhow","bincode",@@@ -1521,7 -1521,7 +1521,7 @@@[[package]]name = "collab-rt-protocol"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["anyhow","async-trait",@@@ -1969,7 -1969,7 +1969,7 @@@ checksum = "c2e66c9d817f1720209181c316d[[package]]name = "database-entity"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["bincode","bytes",@@@ -3459,7 -3459,7 +3459,7 @@@ dependencies =[[package]]name = "gotrue"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["anyhow","getrandom 0.2.10",@@@ -3474,7 -3474,7 +3474,7 @@@[[package]]name = "gotrue-entity"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["app-error","jsonwebtoken",@@@ -4098,7 -4098,7 +4098,7 @@@ dependencies =[[package]]name = "infra"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["anyhow","bytes",@@@ -6770,7 -6784,7 +6770,7 @@@ dependencies =[[package]]name = "shared-entity"version = "0.1.0"- source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=39057f85a408a40dc702a9e54fd1b9dc91bb36e4#39057f85a408a40dc702a9e54fd1b9dc91bb36e4"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=9ea3c46c26b006decfd3c98fffe910dd49a6607d#9ea3c46c26b006decfd3c98fffe910dd49a6607d"++source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e98e6811f8e5cf1a5ab5a92dc9b35006e254579#3e98e6811f8e5cf1a5ab5a92dc9b35006e254579"dependencies = ["anyhow","app-error",diff --cc frontend/rust-lib/Cargo.tomlindex f1d811bf2d,88972e5bfb..581715985f--- a/frontend/rust-lib/Cargo.toml+++ b/frontend/rust-lib/Cargo.toml@@@ -105,8 -105,8 +105,8 @@@ tantivy = { version = "0.24.0"# Run the script.add_workspace_members:# scripts/tool/update_client_api_rev.sh new_rev_id# ⚠️⚠️⚠️️- client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "39057f85a408a40dc702a9e54fd1b9dc91bb36e4" }- client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "39057f85a408a40dc702a9e54fd1b9dc91bb36e4" }-client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "9ea3c46c26b006decfd3c98fffe910dd49a6607d" }-client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "9ea3c46c26b006decfd3c98fffe910dd49a6607d" }++client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3e98e6811f8e5cf1a5ab5a92dc9b35006e254579" }++client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3e98e6811f8e5cf1a5ab5a92dc9b35006e254579" }[profile.dev]opt-level = 0diff --cc frontend/rust-lib/flowy-ai/src/chat.rsindex 44e2a1d41c,44e2a1d41c..5be2b7b014--- a/frontend/rust-lib/flowy-ai/src/chat.rs+++ b/frontend/rust-lib/flowy-ai/src/chat.rs@@@ -581,7 -581,7 +581,6 @@@ impl Chatauthor_type: record.author_type,author_id: record.author_id,reply_message_id: record.reply_message_id,-- metadata: record.metadata,}).collect::<Vec<_>>();@@@ -642,7 -642,7 +641,7 @@@ fn save_chat_message_diskauthor_type: message.author.author_type as i64,author_id: message.author.author_id.to_string(),reply_message_id: message.reply_message_id,-- metadata: Some(serde_json::to_string(&message.meta_data).unwrap_or_default()),++ metadata: None,}).collect::<Vec<_>>();insert_chat_messages(conn, &records)?;diff --cc frontend/rust-lib/flowy-ai/src/entities.rsindex c48fbd9646,c48fbd9646..d0cb7eda02--- a/frontend/rust-lib/flowy-ai/src/entities.rs+++ b/frontend/rust-lib/flowy-ai/src/entities.rs@@@ -296,9 -296,9 +296,6 @@@ pub struct ChatMessagePB#[pb(index = 6, one_of)]pub reply_message_id: Option<i64>,---- #[pb(index = 7, one_of)]-- pub metadata: Option<String>,}#[derive(Debug, Clone, Default, ProtoBuf)]@@@ -319,7 -319,7 +316,6 @@@ impl From<ChatMessage> for ChatMessagePauthor_type: chat_message.author.author_type as i64,author_id: chat_message.author.author_id.to_string(),reply_message_id: None,-- metadata: Some(serde_json::to_string(&chat_message.meta_data).unwrap_or_default()),}}}diff --cc frontend/rust-lib/flowy-server/src/af_cloud/impls/chat.rsindex 24798d768d,24798d768d..4081d659ba--- a/frontend/rust-lib/flowy-server/src/af_cloud/impls/chat.rs+++ b/frontend/rust-lib/flowy-server/src/af_cloud/impls/chat.rs@@@ -65,7 -65,7 +65,6 @@@ wherlet params = CreateChatMessageParams {content: message.to_string(),message_type,-- metadata: metadata.to_vec(),};let message = try_get_client?