@@ -1017,9 +1017,11 @@ export const EditorUI = (props: EditorUIProps) => {
10171017 const message = intl . formatMessage ( { id : 'editor.explainFunctionByAI' } , { content :context , currentFunction : currentFunction . current } )
10181018 await props . plugin . call ( 'popupPanel' , 'showPopupPanel' , true )
10191019 setTimeout ( async ( ) => {
1020- // Check if right side panel has a hidden plugin and show it
1021- const hiddenPlugin = await props . plugin . call ( 'rightSidePanel' , 'getHiddenPlugin' )
1022- if ( hiddenPlugin ) await props . plugin . call ( 'rightSidePanel' , 'togglePanel' )
1020+ // Show right side panel if it's hidden
1021+ const isPanelHidden = await props . plugin . call ( 'rightSidePanel' , 'isPanelHidden' )
1022+ if ( isPanelHidden ) {
1023+ await props . plugin . call ( 'rightSidePanel' , 'togglePanel' )
1024+ }
10231025 await props . plugin . call ( 'remixAI' as any , 'chatPipe' , 'code_explaining' , message , context )
10241026 } , 500 )
10251027 trackMatomoEvent < AIEvent > ( { category : 'ai' , action : 'remixAI' , name : 'explainFunction' , isClick : true } )
@@ -1044,9 +1046,11 @@ export const EditorUI = (props: EditorUIProps) => {
10441046
10451047 await props . plugin . call ( 'popupPanel' , 'showPopupPanel' , true )
10461048 setTimeout ( async ( ) => {
1047- // Check if right side panel has a hidden plugin and show it
1048- const hiddenPlugin = await props . plugin . call ( 'rightSidePanel' , 'getHiddenPlugin' )
1049- if ( hiddenPlugin ) await props . plugin . call ( 'rightSidePanel' , 'togglePanel' )
1049+ // Show right side panel if it's hidden
1050+ const isPanelHidden = await props . plugin . call ( 'rightSidePanel' , 'isPanelHidden' )
1051+ if ( isPanelHidden ) {
1052+ await props . plugin . call ( 'rightSidePanel' , 'togglePanel' )
1053+ }
10501054 await props . plugin . call ( 'remixAI' as any , 'chatPipe' , 'code_explaining' , selectedCode , content , pipeMessage )
10511055 } , 500 )
10521056 trackMatomoEvent < AIEvent > ( { category : 'ai' , action : 'remixAI' , name : 'explainFunction' , isClick : true } )
0 commit comments