File tree 2 files changed +8
-1
lines changed
src/extensions/additional/GPT/MarkupGpt
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ export const gptWidgetProps = (
58
58
onTryAgain : async ( { markup, customPrompt, promptData} ) => {
59
59
return gptRequestHandler ( { markup, customPrompt, promptData} ) ;
60
60
} ,
61
+ onClose : ( ) => {
62
+ console . log ( 'close' ) ;
63
+ } ,
61
64
onLike : async ( ) => { } ,
62
65
onDislike : async ( ) => { } ,
63
66
onApplyResult : ( markup ) => {
Original file line number Diff line number Diff line change @@ -135,7 +135,11 @@ export function mGptPlugin<
135
135
return renderPopup ( this . _anchor as HTMLElement , {
136
136
...gptProps ,
137
137
disablePromptPresets : this . disablePromptPresets ,
138
- onClose : ( ) => hideMarkupGpt ( this . _view ) ,
138
+ onClose : ( ) => {
139
+ hideMarkupGpt ( this . _view ) ;
140
+
141
+ gptProps . onClose ?.( ) ;
142
+ } ,
139
143
markup : this . markup ,
140
144
onApplyResult : ( changedMarkup ) => this . _onApplyResult ( changedMarkup ) ,
141
145
} ) ;
You can’t perform that action at this time.
0 commit comments