Skip to content

Commit e10b6c5

Browse files
committed
fix: add function to check if Firefox sidebar is open
1 parent 8c88e02 commit e10b6c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utils/rpc/background-fns.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,10 @@ export async function showSidepanel() {
744744
}
745745
}
746746

747+
export function isFirefoxSidebarOpen() {
748+
return browser.sidebarAction.isOpen({})
749+
}
750+
747751
function getTabCaptureMediaStreamId(tabId: number, consumerTabId?: number) {
748752
return new Promise<string | undefined>((resolve, reject) => {
749753
browser.tabCapture.getMediaStreamId(
@@ -1163,6 +1167,7 @@ export const backgroundFunctions = {
11631167
getPinnedChats,
11641168
clearAllChatHistory,
11651169
showSidepanel,
1170+
isFirefoxSidebarOpen,
11661171
showSettings: showSettingsForBackground,
11671172
updateSidepanelModelList,
11681173
forwardGmailAction,

0 commit comments

Comments
 (0)