feat(core): add chat-panel track (#11323)

Close [AF-2434](https://linear.app/affine-design/issue/AF-2434).
This commit is contained in:
akumatus
2025-03-31 17:01:09 +00:00
parent bc0f32f20b
commit afd1a30b96
6 changed files with 48 additions and 2 deletions
@@ -101,6 +101,10 @@ export const EditorChatPanel = forwardRef(function EditorChatPanel(
const docRecord = docsService.list.doc$(docId).value;
return docRecord?.meta$.value ?? null;
},
getDocPrimaryMode: (docId: string) => {
const docRecord = docsService.list.doc$(docId).value;
return docRecord?.primaryMode$.value ?? 'page';
},
getDoc: (docId: string) => {
const doc = workspaceService.workspace.docCollection.getDoc(docId);
return doc?.getStore() ?? null;