feat: add entry for Independent Panel and Keyboard Shortcuts

This commit is contained in:
josc146
2023-04-02 21:34:58 +08:00
parent 60b479729a
commit 5fbbd5d825
12 changed files with 93 additions and 7 deletions
+3 -1
View File
@@ -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)
}