Update version
This commit is contained in:
@@ -99,8 +99,8 @@ async function completeTextHandler(openAI) {
|
|||||||
const selection = window.getSelection()
|
const selection = window.getSelection()
|
||||||
const selectedText = selection.toString()
|
const selectedText = selection.toString()
|
||||||
if (!selectedText) return
|
if (!selectedText) return
|
||||||
const editedText = await openAI.completeText(selectedText)
|
const editedText = (await openAI.completeText(selectedText)).trimStart()
|
||||||
replaceSelectedText(selectedText + editedText, selection)
|
replaceSelectedText(selectedText + '\n' + editedText, selection)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function askHandler(openAI) {
|
async function askHandler(openAI) {
|
||||||
@@ -108,7 +108,7 @@ async function askHandler(openAI) {
|
|||||||
const selection = window.getSelection()
|
const selection = window.getSelection()
|
||||||
const selectedText = selection.toString()
|
const selectedText = selection.toString()
|
||||||
if (!selectedText) return
|
if (!selectedText) return
|
||||||
const editedText = await openAI.completeText('In Latex, ' + selectedText)
|
const editedText = (await openAI.completeText('In latex, ' + selectedText)).trimStart()
|
||||||
replaceSelectedText(editedText, selection)
|
replaceSelectedText(editedText, selection)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user