I am currently developing a VSCode extension in javascript for a specific type of files. I would like to add a functionality that when opening this file type, the extension will check if the default editor of the file type is VSCode and if not this message will appear:

And then if the user clicks on Open with VSCode, the extension will set VSCode as the default editor of this type of files.
I searched on the VS Code API but I didn't find something useful and I have no clue how I could do something like that.
Thank you very much in advance!