Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/remix-ide/src/app/components/bottom-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ export const BottomBar = ({ plugin }: BottomBarProps) => {
}
setExplaining(true)
try {
// Check if pinned panel has a closed plugin and maximize it
const closedPlugin = await plugin.call('pinnedPanel', 'getClosedPlugin')
if (closedPlugin) {
await plugin.call('pinnedPanel', 'maximizePlugin', closedPlugin)
}

await plugin.call('menuicons', 'select', 'remixaiassistant')
await new Promise((resolve) => setTimeout(resolve, 500))
const content = await plugin.call('fileManager', 'readFile', currentFilePath)
Expand Down
10 changes: 10 additions & 0 deletions libs/remix-ui/editor/src/lib/remix-ui-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,11 @@ export const EditorUI = (props: EditorUIProps) => {
const message = intl.formatMessage({ id: 'editor.explainFunctionByAI' }, { content:context, currentFunction: currentFunction.current })
await props.plugin.call('popupPanel', 'showPopupPanel', true)
setTimeout(async () => {
// Check if pinned panel has a closed plugin and maximize it
const closedPlugin = await props.plugin.call('pinnedPanel', 'getClosedPlugin')
if (closedPlugin) {
await props.plugin.call('pinnedPanel', 'maximizePlugin', closedPlugin)
}
await props.plugin.call('remixAI' as any, 'chatPipe', 'code_explaining', message, context)
}, 500)
trackMatomoEvent<AIEvent>({ category: 'ai', action: 'remixAI', name: 'explainFunction', isClick: true })
Expand All @@ -1039,6 +1044,11 @@ export const EditorUI = (props: EditorUIProps) => {

await props.plugin.call('popupPanel', 'showPopupPanel', true)
setTimeout(async () => {
// Check if pinned panel has a closed plugin and maximize it
const closedPlugin = await props.plugin.call('pinnedPanel', 'getClosedPlugin')
if (closedPlugin) {
await props.plugin.call('pinnedPanel', 'maximizePlugin', closedPlugin)
}
await props.plugin.call('remixAI' as any, 'chatPipe', 'code_explaining', selectedCode, content, pipeMessage)
}, 500)
trackMatomoEvent<AIEvent>({ category: 'ai', action: 'remixAI', name: 'explainFunction', isClick: true })
Expand Down