chore: remove view desc (#6691)

* chore: remove desc in view

* chore: remove desc in view
This commit is contained in:
Nathan.fooo 2024-11-01 14:18:35 +08:00 committed by GitHub
parent a9a784f0f0
commit 0e5ff844b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 68 additions and 129 deletions

View File

@ -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({

View File

@ -209,7 +209,6 @@ class ViewBloc extends Bloc<ViewEvent, ViewState> {
final result = await ViewBackendService.createView(
parentViewId: view.id,
name: e.name,
desc: '',
layoutType: e.layoutType,
ext: {},
openAfterCreate: e.openAfterCreated,

View File

@ -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 ?? [];

View File

@ -14,7 +14,6 @@ class WorkspaceService {
Future<FlowyResult<ViewPB, FlowyError>> 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;
}

View File

@ -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",

View File

@ -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:

View File

@ -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",

View File

@ -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

View File

@ -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",

View File

@ -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:

View File

@ -92,14 +92,6 @@ pub trait ChatCloudService: Send + Sync + 'static {
async fn get_local_ai_config(&self, workspace_id: &str) -> Result<LocalAIConfig, FlowyError>;
async fn create_chat_context(
&self,
_workspace_id: &str,
_chat_context: CreateTextChatContext,
) -> Result<(), FlowyError> {
Ok(())
}
async fn get_workspace_plan(
&self,
workspace_id: &str,

View File

@ -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,

View File

@ -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<String>,
#[pb(index = 5)]
#[pb(index = 4)]
pub layout: ViewLayoutPB,
#[pb(index = 6)]
#[pb(index = 5)]
pub initial_data: Vec<u8>,
#[pb(index = 7)]
#[pb(index = 6)]
pub meta: HashMap<String, String>,
// 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<u32>,
// 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<ViewSectionPB>,
#[pb(index = 11, one_of)]
#[pb(index = 10, one_of)]
pub view_id: Option<String>,
// 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<String>,
}
@ -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<u8>,
}
@ -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<CreateViewParams> 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<CreateViewParams> 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()),

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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(())
}