File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
libs/remix-ui/editor/src/lib/providers Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,14 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
3939 }
4040
4141 // eslint-disable-next-line no-useless-escape
42- const regex = new RegExp ( '\/\/(.*)\n ' , 'g' )
42+ const regex = new RegExp ( '\/\/\/ (.*)\n ' , 'g' )
4343
4444 const generativeComment = [ ...word . matchAll ( regex ) ]
4545 if ( generativeComment && generativeComment . length ) {
4646 // use the code generation model
4747 const { data} = await axios . post ( 'https://gpt-chat.remixproject.org/infer' , { comment : generativeComment [ generativeComment . length - 1 ] [ 1 ] } )
48- const parsedData = JSON . parse ( data )
48+ const parsedData = JSON . parse ( data ) . trimStart ( )
49+ console . log ( 'parsedData' , parsedData )
4950 const item : monacoTypes . languages . InlineCompletion = {
5051 insertText : parsedData
5152 } ;
You can’t perform that action at this time.
0 commit comments