From 0e5ff844b65d3f6db8376023f9dabf863be4e6f8 Mon Sep 17 00:00:00 2001 From: "Nathan.fooo" <86001920+appflowy@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:18:35 +0800 Subject: [PATCH] chore: remove view desc (#6691) * chore: remove desc in view * chore: remove desc in view --- .../menu/sidebar_sections_bloc.dart | 4 +-- .../workspace/application/view/view_bloc.dart | 1 - .../application/view/view_service.dart | 7 ----- .../workspace/workspace_service.dart | 5 ---- frontend/appflowy_tauri/src-tauri/Cargo.lock | 16 +++++----- frontend/appflowy_tauri/src-tauri/Cargo.toml | 16 +++++----- .../appflowy_web_app/src-tauri/Cargo.lock | 16 +++++----- .../appflowy_web_app/src-tauri/Cargo.toml | 16 +++++----- frontend/rust-lib/Cargo.lock | 16 +++++----- frontend/rust-lib/Cargo.toml | 16 +++++----- frontend/rust-lib/flowy-ai-pub/src/cloud.rs | 8 ----- .../src/middleware/chat_service_mw.rs | 20 ++----------- .../flowy-folder/src/entities/view.rs | 29 +++++++------------ frontend/rust-lib/flowy-folder/src/manager.rs | 2 -- .../flowy-folder/src/view_operation.rs | 1 - .../flowy-server/src/af_cloud/impls/chat.rs | 17 +---------- .../flowy-server/src/af_cloud/impls/folder.rs | 7 ++++- 17 files changed, 68 insertions(+), 129 deletions(-) diff --git a/frontend/appflowy_flutter/lib/workspace/application/menu/sidebar_sections_bloc.dart b/frontend/appflowy_flutter/lib/workspace/application/menu/sidebar_sections_bloc.dart index 48422720ba..5a20b29c09 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/menu/sidebar_sections_bloc.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/menu/sidebar_sections_bloc.dart @@ -76,11 +76,10 @@ class SidebarSectionsBloc ); } }, - createRootViewInSection: (name, section, desc, index) async { + createRootViewInSection: (name, section, index) async { final result = await _workspaceService.createView( name: name, viewSection: section, - desc: desc, index: index, ); result.fold( @@ -283,7 +282,6 @@ class SidebarSectionsEvent with _$SidebarSectionsEvent { const factory SidebarSectionsEvent.createRootViewInSection({ required String name, required ViewSectionPB viewSection, - String? desc, int? index, }) = _CreateRootViewInSection; const factory SidebarSectionsEvent.moveRootView({ diff --git a/frontend/appflowy_flutter/lib/workspace/application/view/view_bloc.dart b/frontend/appflowy_flutter/lib/workspace/application/view/view_bloc.dart index 88b33a2d13..c6c35672b9 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/view/view_bloc.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/view/view_bloc.dart @@ -209,7 +209,6 @@ class ViewBloc extends Bloc { final result = await ViewBackendService.createView( parentViewId: view.id, name: e.name, - desc: '', layoutType: e.layoutType, ext: {}, openAfterCreate: e.openAfterCreated, diff --git a/frontend/appflowy_flutter/lib/workspace/application/view/view_service.dart b/frontend/appflowy_flutter/lib/workspace/application/view/view_service.dart index a8665135b1..3971256799 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/view/view_service.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/view/view_service.dart @@ -18,7 +18,6 @@ class ViewBackendService { /// The [name] is the name of the view. required String name, - String? desc, /// The default value of [openAfterCreate] is false, meaning the view will /// not be opened nor set as the current view. However, if set to true, the @@ -46,7 +45,6 @@ class ViewBackendService { final payload = CreateViewPayloadPB.create() ..parentViewId = parentViewId ..name = name - ..desc = desc ?? "" ..layout = layoutType ..setAsCurrent = openAfterCreate ..initialData = initialDataBytes ?? []; @@ -55,10 +53,6 @@ class ViewBackendService { payload.meta.addAll(ext); } - if (desc != null) { - payload.desc = desc; - } - if (index != null) { payload.index = index; } @@ -90,7 +84,6 @@ class ViewBackendService { final payload = CreateOrphanViewPayloadPB.create() ..viewId = viewId ..name = name - ..desc = desc ?? "" ..layout = layoutType ..initialData = initialDataBytes ?? []; diff --git a/frontend/appflowy_flutter/lib/workspace/application/workspace/workspace_service.dart b/frontend/appflowy_flutter/lib/workspace/application/workspace/workspace_service.dart index 067767a9e1..b958e5cd30 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/workspace/workspace_service.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/workspace/workspace_service.dart @@ -14,7 +14,6 @@ class WorkspaceService { Future> createView({ required String name, required ViewSectionPB viewSection, - String? desc, int? index, ViewLayoutPB? layout, bool? setAsCurrent, @@ -27,10 +26,6 @@ class WorkspaceService { ..layout = layout ?? ViewLayoutPB.Document ..section = viewSection; - if (desc != null) { - payload.desc = desc; - } - if (index != null) { payload.index = index; } diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock index 05ad9bbf22..6f0df90923 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.lock +++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock @@ -1030,7 +1030,7 @@ dependencies = [ [[package]] name = "collab" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "arc-swap", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "async-trait", @@ -1094,7 +1094,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "arc-swap", @@ -1115,7 +1115,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "bytes", @@ -1135,7 +1135,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "arc-swap", @@ -1157,7 +1157,7 @@ dependencies = [ [[package]] name = "collab-importer" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "async-recursion", @@ -1218,7 +1218,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "async-stream", @@ -1298,7 +1298,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "collab", diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml index 4a525c6798..5804f50898 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.toml +++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml @@ -120,14 +120,14 @@ custom-protocol = ["tauri/custom-protocol"] # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } +collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } # Working directory: frontend # To update the commit ID, run: diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.lock b/frontend/appflowy_web_app/src-tauri/Cargo.lock index 732c041a37..5c4c692bc7 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.lock +++ b/frontend/appflowy_web_app/src-tauri/Cargo.lock @@ -1028,7 +1028,7 @@ dependencies = [ [[package]] name = "collab" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "arc-swap", @@ -1053,7 +1053,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "async-trait", @@ -1092,7 +1092,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "arc-swap", @@ -1113,7 +1113,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "bytes", @@ -1133,7 +1133,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "arc-swap", @@ -1155,7 +1155,7 @@ dependencies = [ [[package]] name = "collab-importer" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "async-recursion", @@ -1216,7 +1216,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "async-stream", @@ -1296,7 +1296,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "collab", diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.toml b/frontend/appflowy_web_app/src-tauri/Cargo.toml index 64a30a8364..be0d36abe3 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.toml +++ b/frontend/appflowy_web_app/src-tauri/Cargo.toml @@ -118,14 +118,14 @@ custom-protocol = ["tauri/custom-protocol"] # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } +collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } # Working directory: frontend diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock index 0bba172d22..ced57000d8 100644 --- a/frontend/rust-lib/Cargo.lock +++ b/frontend/rust-lib/Cargo.lock @@ -891,7 +891,7 @@ dependencies = [ [[package]] name = "collab" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "arc-swap", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "async-trait", @@ -955,7 +955,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "arc-swap", @@ -976,7 +976,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "bytes", @@ -996,7 +996,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "arc-swap", @@ -1018,7 +1018,7 @@ dependencies = [ [[package]] name = "collab-importer" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "async-recursion", @@ -1079,7 +1079,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "async-stream", @@ -1159,7 +1159,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=60e4e8d642eb0fe5752bf917acbe2f66327b4b8d#60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e7a63bad71e824c4607bda3c9a55c807067fb954#e7a63bad71e824c4607bda3c9a55c807067fb954" dependencies = [ "anyhow", "collab", diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml index 1dfe771f2e..bb35791111 100644 --- a/frontend/rust-lib/Cargo.toml +++ b/frontend/rust-lib/Cargo.toml @@ -142,14 +142,14 @@ rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "1710120 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } -collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "60e4e8d642eb0fe5752bf917acbe2f66327b4b8d" } +collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } +collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e7a63bad71e824c4607bda3c9a55c807067fb954" } # Working directory: frontend # To update the commit ID, run: diff --git a/frontend/rust-lib/flowy-ai-pub/src/cloud.rs b/frontend/rust-lib/flowy-ai-pub/src/cloud.rs index 503bb663d9..d2ce946768 100644 --- a/frontend/rust-lib/flowy-ai-pub/src/cloud.rs +++ b/frontend/rust-lib/flowy-ai-pub/src/cloud.rs @@ -92,14 +92,6 @@ pub trait ChatCloudService: Send + Sync + 'static { async fn get_local_ai_config(&self, workspace_id: &str) -> Result; - async fn create_chat_context( - &self, - _workspace_id: &str, - _chat_context: CreateTextChatContext, - ) -> Result<(), FlowyError> { - Ok(()) - } - async fn get_workspace_plan( &self, workspace_id: &str, diff --git a/frontend/rust-lib/flowy-ai/src/middleware/chat_service_mw.rs b/frontend/rust-lib/flowy-ai/src/middleware/chat_service_mw.rs index f3ecb4e703..54f5972862 100644 --- a/frontend/rust-lib/flowy-ai/src/middleware/chat_service_mw.rs +++ b/frontend/rust-lib/flowy-ai/src/middleware/chat_service_mw.rs @@ -8,8 +8,8 @@ use std::collections::HashMap; use flowy_ai_pub::cloud::{ ChatCloudService, ChatMessage, ChatMessageMetadata, ChatMessageType, CompletionType, - CreateTextChatContext, LocalAIConfig, MessageCursor, RelatedQuestion, RepeatedChatMessage, - RepeatedRelatedQuestion, StreamAnswer, StreamComplete, SubscriptionPlan, + LocalAIConfig, MessageCursor, RelatedQuestion, RepeatedChatMessage, RepeatedRelatedQuestion, + StreamAnswer, StreamComplete, SubscriptionPlan, }; use flowy_error::{FlowyError, FlowyResult}; use futures::{stream, Sink, StreamExt, TryStreamExt}; @@ -308,22 +308,6 @@ impl ChatCloudService for AICloudServiceMiddleware { self.cloud_service.get_local_ai_config(workspace_id).await } - async fn create_chat_context( - &self, - workspace_id: &str, - chat_context: CreateTextChatContext, - ) -> Result<(), FlowyError> { - if self.local_llm_controller.is_running() { - // TODO(nathan): support offline ai context - Ok(()) - } else { - self - .cloud_service - .create_chat_context(workspace_id, chat_context) - .await - } - } - async fn get_workspace_plan( &self, workspace_id: &str, diff --git a/frontend/rust-lib/flowy-folder/src/entities/view.rs b/frontend/rust-lib/flowy-folder/src/entities/view.rs index fe77f10883..60df8158de 100644 --- a/frontend/rust-lib/flowy-folder/src/entities/view.rs +++ b/frontend/rust-lib/flowy-folder/src/entities/view.rs @@ -250,42 +250,39 @@ pub struct CreateViewPayloadPB { #[pb(index = 2)] pub name: String, - #[pb(index = 3)] - pub desc: String, - - #[pb(index = 4, one_of)] + #[pb(index = 3, one_of)] pub thumbnail: Option, - #[pb(index = 5)] + #[pb(index = 4)] pub layout: ViewLayoutPB, - #[pb(index = 6)] + #[pb(index = 5)] pub initial_data: Vec, - #[pb(index = 7)] + #[pb(index = 6)] pub meta: HashMap, // Mark the view as current view after creation. - #[pb(index = 8)] + #[pb(index = 7)] pub set_as_current: bool, // The index of the view in the parent view. // If the index is None or the index is out of range, the view will be appended to the end of the parent view. - #[pb(index = 9, one_of)] + #[pb(index = 8, one_of)] pub index: Option, // The section of the view. // Only the view in public section will be shown in the shared workspace view list. // The view in private section will only be shown in the user's private view list. - #[pb(index = 10, one_of)] + #[pb(index = 9, one_of)] pub section: Option, - #[pb(index = 11, one_of)] + #[pb(index = 10, one_of)] pub view_id: Option, // The extra data of the view. // Refer to the extra field in the collab - #[pb(index = 12, one_of)] + #[pb(index = 11, one_of)] pub extra: Option, } @@ -309,12 +306,9 @@ pub struct CreateOrphanViewPayloadPB { pub name: String, #[pb(index = 3)] - pub desc: String, - - #[pb(index = 4)] pub layout: ViewLayoutPB, - #[pb(index = 5)] + #[pb(index = 4)] pub initial_data: Vec, } @@ -322,7 +316,6 @@ pub struct CreateOrphanViewPayloadPB { pub struct CreateViewParams { pub parent_view_id: String, pub name: String, - pub desc: String, pub layout: ViewLayoutPB, pub view_id: String, pub initial_data: ViewData, @@ -352,7 +345,6 @@ impl TryInto for CreateViewPayloadPB { Ok(CreateViewParams { parent_view_id, name, - desc: self.desc, layout: self.layout, view_id, initial_data: ViewData::Data(self.initial_data.into()), @@ -376,7 +368,6 @@ impl TryInto for CreateOrphanViewPayloadPB { Ok(CreateViewParams { parent_view_id, name, - desc: self.desc, layout: self.layout, view_id: self.view_id, initial_data: ViewData::Data(self.initial_data.into()), diff --git a/frontend/rust-lib/flowy-folder/src/manager.rs b/frontend/rust-lib/flowy-folder/src/manager.rs index c0ddd77998..02028a2eaa 100644 --- a/frontend/rust-lib/flowy-folder/src/manager.rs +++ b/frontend/rust-lib/flowy-folder/src/manager.rs @@ -1043,7 +1043,6 @@ impl FolderManager { let duplicate_params = CreateViewParams { parent_view_id: current_parent_id.clone(), name, - desc: view.desc.clone(), layout: view.layout.clone().into(), initial_data: ViewData::DuplicateData(view_data), view_id: gen_view_id().to_string(), @@ -1658,7 +1657,6 @@ impl FolderManager { let params = CreateViewParams { parent_view_id, name: import_data.name, - desc: "".to_string(), layout: import_data.view_layout.clone().into(), initial_data: ViewData::Empty, view_id, diff --git a/frontend/rust-lib/flowy-folder/src/view_operation.rs b/frontend/rust-lib/flowy-folder/src/view_operation.rs index 638a381222..6f44278d46 100644 --- a/frontend/rust-lib/flowy-folder/src/view_operation.rs +++ b/frontend/rust-lib/flowy-folder/src/view_operation.rs @@ -158,7 +158,6 @@ pub(crate) fn create_view(uid: i64, params: CreateViewParams, layout: ViewLayout id: params.view_id, parent_view_id: params.parent_view_id, name: params.name, - desc: params.desc, created_at: time, is_favorite: false, layout, diff --git a/frontend/rust-lib/flowy-server/src/af_cloud/impls/chat.rs b/frontend/rust-lib/flowy-server/src/af_cloud/impls/chat.rs index b7fa9a3b77..e40c5de97e 100644 --- a/frontend/rust-lib/flowy-server/src/af_cloud/impls/chat.rs +++ b/frontend/rust-lib/flowy-server/src/af_cloud/impls/chat.rs @@ -1,7 +1,5 @@ use crate::af_cloud::AFServer; -use client_api::entity::ai_dto::{ - CompleteTextParams, CompletionType, CreateTextChatContext, RepeatedRelatedQuestion, -}; +use client_api::entity::ai_dto::{CompleteTextParams, CompletionType, RepeatedRelatedQuestion}; use client_api::entity::{ CreateAnswerMessageParams, CreateChatMessageParams, CreateChatParams, MessageCursor, RepeatedChatMessage, @@ -207,19 +205,6 @@ where Ok(config) } - async fn create_chat_context( - &self, - workspace_id: &str, - chat_context: CreateTextChatContext, - ) -> Result<(), FlowyError> { - self - .inner - .try_get_client()? - .create_chat_context(workspace_id, chat_context) - .await?; - Ok(()) - } - async fn get_workspace_plan( &self, workspace_id: &str, diff --git a/frontend/rust-lib/flowy-server/src/af_cloud/impls/folder.rs b/frontend/rust-lib/flowy-server/src/af_cloud/impls/folder.rs index 785e02b693..4136ffe10c 100644 --- a/frontend/rust-lib/flowy-server/src/af_cloud/impls/folder.rs +++ b/frontend/rust-lib/flowy-server/src/af_cloud/impls/folder.rs @@ -11,7 +11,7 @@ use collab_folder::RepeatedViewIdentifier; use serde_json::to_vec; use std::path::PathBuf; use std::sync::Arc; -use tracing::instrument; +use tracing::{instrument, trace}; use uuid::Uuid; use flowy_error::{ErrorCode, FlowyError}; @@ -344,6 +344,11 @@ where let file_path = PathBuf::from(file_path); let client = self.inner.try_get_client()?; let url = client.create_import(&file_path).await?.presigned_url; + trace!( + "Importing zip file: {} to url: {}", + file_path.display(), + url + ); client.upload_import_file(&file_path, &url).await?; Ok(()) }