We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68f8f00 commit b7af995Copy full SHA for b7af995
src/content-script/selection-tools/index.mjs
@@ -5,6 +5,7 @@ import {
5
Palette,
6
QuestionCircle,
7
Translate,
8
+ Braces,
9
} from 'react-bootstrap-icons'
10
import { getPreferredLanguage } from '../../config.mjs'
11
@@ -49,6 +50,14 @@ export const config = {
49
50
genPrompt: async (selection) =>
51
`Divide the following into paragraphs that are easy to read and understand:\n"${selection}"`,
52
},
53
+ code: {
54
+ icon: <Braces />,
55
+ label: 'Code Explain',
56
+ genPrompt: async (selection) => {
57
+ const preferredLanguage = await getPreferredLanguage()
58
+ return `Reply in ${preferredLanguage}.Explain the following code:\n"${selection}"`
59
+ },
60
61
ask: {
62
icon: <QuestionCircle />,
63
label: 'Ask',
0 commit comments