feat: add block visibility config (#8371)

This commit is contained in:
Yifeng Wang
2024-09-24 17:36:06 +08:00
committed by GitHub
parent 3d9a777acd
commit a77061e848
11 changed files with 184 additions and 174 deletions

View File

@@ -16,7 +16,7 @@
"@affine/i18n": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/track": "workspace:*",
"@blocksuite/affine": "0.17.14",
"@blocksuite/affine": "0.17.15",
"@blocksuite/icons": "2.1.67",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^7.0.0",

View File

@@ -313,7 +313,7 @@ const SAVE_CHAT_TO_BLOCK_ACTION: ChatAction = {
curMode,
rootService as RootService
);
const newBlockIndex = layer.generateIndex('affine:embed-ai-chat');
const newBlockIndex = layer.generateIndex();
// If current mode is not edgeless, switch to edgeless mode first
if (curMode !== 'edgeless') {
// Set mode to edgeless

View File

@@ -113,7 +113,7 @@ function createNewNote(host: EditorHost): AIItemConfig {
{
xywh: newBound.serialize(),
displayMode: NoteDisplayMode.EdgelessOnly,
index: service.generateIndex('affine:note'),
index: service.generateIndex(),
},
doc.root.id
);