mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-10 07:14:22 +08:00
feat: add entry for Independent Panel and Keyboard Shortcuts
This commit is contained in:
@@ -241,7 +241,9 @@ async function prepareForRightClickMenu() {
|
||||
if (data.itemId in toolsConfig) {
|
||||
prompt = await toolsConfig[data.itemId].genPrompt(data.selectionText)
|
||||
} else if (data.itemId in menuConfig) {
|
||||
prompt = await menuConfig[data.itemId].genPrompt()
|
||||
const menuItem = menuConfig[data.itemId]
|
||||
if (!menuItem.genPrompt) return
|
||||
else prompt = await menuItem.genPrompt()
|
||||
if (prompt) prompt = cropText(`Reply in ${await getPreferredLanguage()}.\n` + prompt)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { getCoreContentText } from '../../utils/get-core-content-text'
|
||||
import { openUrl } from '../../utils/open-url'
|
||||
import Browser from 'webextension-polyfill'
|
||||
|
||||
export const config = {
|
||||
newChat: {
|
||||
@@ -13,4 +15,10 @@ export const config = {
|
||||
return `The following is the text content of a web page, analyze the core content and summarize:\n${getCoreContentText()}`
|
||||
},
|
||||
},
|
||||
openConversationPage: {
|
||||
label: 'Open Conversation Page',
|
||||
action: async () => {
|
||||
openUrl(Browser.runtime.getURL('IndependentPanel.html'))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user