Skip to content

BlockSuite API Documentation / @blocksuite/presets / actionToHandler

Function: actionToHandler()

actionToHandler<T>(id, generatingIcon, variants?): (host) => void

Type parameters

T extends keyof AIActions

Parameters

id: T

generatingIcon: TemplateResult<1>

variants?: Omit<Parameters<AIActions[T]>[0], keyof AITextActionOptions>

Returns

Function

Parameters

host: EditorHost

Returns

void

Source

packages/presets/src/ai/actions/doc-handler.ts:163