Skip to content

Commit 356926a

Browse files
authored
refactor(selection-tools): remove redundant getPreferredLanguage calls
1 parent 310f362 commit 356926a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/content-script/selection-tools/index.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ const createGenPrompt =
3232
fullMessage += `. If it is already in ${preferredLanguage}, translate it into English and only show me the translated content`
3333
}
3434

35+
const prefix = includeLanguagePrefix ? `Reply in ${preferredLanguage}.` : ''
36+
return `${prefix}${fullMessage}:\n'''\n${selection}\n'''`
37+
}
38+
3539
export const config = {
3640
explain: {
3741
icon: <ChatText />,

0 commit comments

Comments
 (0)