File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
packages/liveblocks-react-tiptap/src Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
### ` @liveblocks/tiptap `
4
4
5
- - Fix ` FloatingToolbar ` focus behavior in Safari .
5
+ - Add ` closeAi ` Tiptap command to manually close the AI toolbar .
6
6
- Fix ` AiToolbar ` focus behavior in Safari.
7
+ - Fix ` FloatingToolbar ` focus behavior in Safari.
7
8
8
9
### ` @liveblocks/lexical `
9
10
Original file line number Diff line number Diff line change @@ -169,6 +169,12 @@ export const AiExtension = Extension.create<
169
169
return true ;
170
170
} ,
171
171
172
+ closeAi : ( ) => ( ) => {
173
+ ( this . editor . commands as unknown as AiCommands ) . $closeAiToolbar ( ) ;
174
+
175
+ return true ;
176
+ } ,
177
+
172
178
$acceptAiToolbarResponse :
173
179
( ) =>
174
180
( { tr, view } : CommandProps ) => {
Original file line number Diff line number Diff line change @@ -265,8 +265,16 @@ export type CommentsCommands<ReturnType = boolean> = {
265
265
} ;
266
266
267
267
export type AiCommands < ReturnType = boolean > = {
268
+ /**
269
+ * Open the AI toolbar, with an optional prompt.
270
+ */
268
271
askAi : ( prompt ?: string ) => ReturnType ;
269
272
273
+ /**
274
+ * Close the AI toolbar.
275
+ */
276
+ closeAi : ( ) => ReturnType ;
277
+
270
278
// Transitions (see AiToolbarState)
271
279
272
280
/**
You can’t perform that action at this time.
0 commit comments