|
|
|
@ -43,9 +43,8 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const generatedText = (result as any).output[0].generated_text as string |
|
|
|
|
// console.log(word, result)
|
|
|
|
|
|
|
|
|
|
const clean = generatedText.replace(word, '') |
|
|
|
|
// 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, ''), '') |
|
|
|
|
console.log('suggest result', clean) |
|
|
|
|
const item: monacoTypes.languages.InlineCompletion = { |
|
|
|
|
insertText: clean |
|
|
|
|