|
|
@ -43,9 +43,8 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const generatedText = (result as any).output[0].generated_text as string |
|
|
|
const generatedText = (result as any).output[0].generated_text as string |
|
|
|
// console.log(word, result)
|
|
|
|
// the generated text remove a space from the context. that why we need to remove all the spaces
|
|
|
|
|
|
|
|
const clean = generatedText.replace(/ /g, '').replace(word.replace(/ /g, ''), '') |
|
|
|
const clean = generatedText.replace(word, '') |
|
|
|
|
|
|
|
console.log('suggest result', clean) |
|
|
|
console.log('suggest result', clean) |
|
|
|
const item: monacoTypes.languages.InlineCompletion = { |
|
|
|
const item: monacoTypes.languages.InlineCompletion = { |
|
|
|
insertText: clean |
|
|
|
insertText: clean |
|
|
|