Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Inline suggestion interaction with empty autocomplete broke after 0.41 #4703

Open
2 tasks
BeishaoCao-db opened this issue Oct 4, 2024 · 0 comments
Open
2 tasks

Comments

@BeishaoCao-db
Copy link

BeishaoCao-db commented Oct 4, 2024

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.41.0#XQAAAAJRAwAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw4FRrCnGBGpWlpVktocO7_BJCkQTDFxvol36GvVmJLcE84C3knSa45xr2hL4V0Vd8zV6Ld144gL7NITm3WKlHwmiyD-4SVFQYQgvxqbpgmWbogQr5-7RHNWr3xYmY6BU_QqN8DOWwRxMFTKMcoT6kDUNKC9LlS0acSs08_34w0guFIJNMWi1reKkVSN9_-O91boq-2hlVbhlVgLbxXTyFxVJoG5f5Hmfd87Yi8NZqpNJcrfxPSDMUHpJEjwVTMtiEkheggJmhg9OY5OGOHeWaME8tkfP2n6g5OO5khv5VpA0VN5II6Xl1woHMQLMyIlY7DZppuNoBFTJQ6_siBAslXYAAfv74U9SzXwifTzCWnfreweIqDr1k__AlzJOSVXMDSaT-zTedXXtUAcMaRqsWOL4cUpH0gCqviU008p_89pj_qi1TTg

Monaco Editor Playground Code

monaco.languages.registerInlineCompletionsProvider("json", {
	provideInlineCompletions: function (model, position, context, token) {
		console.log('Provide new completion', position, context, token)
		return {items: [
                    {
                        insertText: 'chenfan'
                    },
                    {
                        insertText: 'hello world'
                    }
                ]};
	},
	freeInlineCompletions: function (completions) {
		console.log(completions);
	},
});
monaco.languages.registerCompletionItemProvider('json', {
    provideCompletionItems: () => {
        return {
            suggestions: [
            ]
        };
    }
});

monaco.editor.create(document.getElementById("container"), {
	value: '',
	language: "json",
});

Reproduction Steps

See the video

Actual (Problematic) Behavior

Cannot accept the inline suggestion when an empty suggest list shows

Expected Behavior

Can accept inline suggest if the auto compelte suggest list is not empty

Additional Context

Screen.Recording.2024-10-03.at.6.06.08.PM.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant