mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix: copilot not working (#3425)
This commit is contained in:
@@ -16,6 +16,12 @@ export const headerItemsAtom = atom<Record<string, CallbackMap['headerItem']>>(
|
||||
export const editorItemsAtom = atom<Record<string, CallbackMap['editor']>>({});
|
||||
export const registeredPluginAtom = atom<string[]>([]);
|
||||
export const windowItemsAtom = atom<Record<string, CallbackMap['window']>>({});
|
||||
export const settingItemsAtom = atom<Record<string, CallbackMap['setting']>>(
|
||||
{}
|
||||
);
|
||||
export const formatBarItemsAtom = atom<
|
||||
Record<string, CallbackMap['formatBar']>
|
||||
>({});
|
||||
|
||||
export const currentWorkspaceIdAtom = atom<string | null>(null);
|
||||
export const currentPageIdAtom = atom<string | null>(null);
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
import type { getCurrentBlockRange } from '@blocksuite/blocks';
|
||||
import type { EditorContainer } from '@blocksuite/editor';
|
||||
import type { Page } from '@blocksuite/store';
|
||||
import type { FC } from 'react';
|
||||
|
||||
export type Part = 'headerItem' | 'editor' | 'window';
|
||||
export type Part = 'headerItem' | 'editor' | 'window' | 'setting' | 'formatBar';
|
||||
|
||||
export type CallbackMap = {
|
||||
headerItem: (root: HTMLElement) => () => void;
|
||||
window: (root: HTMLElement) => () => void;
|
||||
editor: (root: HTMLElement, editor: EditorContainer) => () => void;
|
||||
setting: (root: HTMLElement) => () => void;
|
||||
formatBar: (
|
||||
root: HTMLElement,
|
||||
page: Page,
|
||||
getBlockRange: () => ReturnType<typeof getCurrentBlockRange>
|
||||
) => () => void;
|
||||
};
|
||||
|
||||
export interface PluginContext {
|
||||
|
||||
Reference in New Issue
Block a user