refactor(infra): refactor copilot client (#8813)

This commit is contained in:
EYHN
2024-11-27 06:44:47 +00:00
parent 6b4a1aa917
commit 6e25243868
8 changed files with 149 additions and 85 deletions
@@ -142,10 +142,6 @@ export class AIProvider {
...options: Parameters<BlockSuitePresets.AIActions[T]>
) => ReturnType<BlockSuitePresets.AIActions[T]>
): void {
if (this.actions[id]) {
console.warn(`AI action ${id} is already provided`);
}
// @ts-expect-error TODO: maybe fix this
this.actions[id] = (
...args: Parameters<BlockSuitePresets.AIActions[T]>