microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.11k stars 28.04k forks source link

vscode.dev webmanifest add support for file_handlers #214941

Open kowalski7cc opened 2 weeks ago

kowalski7cc commented 2 weeks ago

Please add support for file_handlers for file association in the PWA version of vscode. One example for file association could be this inspired from ChromeOS text editor:

{
  "file_handlers": [
    {
      "action": "/",
      "accept": {
        "application/javascript": [".js"],
        "application/json": [".json"],
        "application/x-shellscript": [".sh"],
        "application/xml": [".xml"],
        "text/*": [
          ".asp", ".aspx", ".abc", ".acgi", ".aip", ".asm", ".c", ".c++", ".cc", 
          ".clj", ".com", ".coffee", ".conf", ".cpp", ".cs", ".csh", ".css", 
          ".csv", ".cxx", ".def", ".diff", ".ejs", ".el", ".eml", ".etx", ".f", 
          ".f77", ".f90", ".flx", ".for", ".g", ".gn", ".gemspec", ".go", 
          ".groovy", ".gyp", ".gypi", ".h", ".hh", ".hlb", ".hpp", ".hs", ".htc", 
          ".htm", ".html", ".htmls", ".htt", ".htx", ".ics", ".idc", ".ifb", 
          ".jav", ".java", ".jsp", ".ksh", ".list", ".log", ".lsp", ".lst", 
          ".lsx", ".lua", ".m", ".mk", ".mm", ".man", ".manifest", ".mar", 
          ".mcf", ".md", ".mdoc", ".me", ".ms", ".p", ".pch", ".pas", ".patch", 
          ".pl", ".plist", ".pm", ".pod", ".py", ".rake", ".rb", ".rexx", ".roff", 
          ".rst", ".rt", ".rtx", ".ru", ".s", ".scm", ".sdml", ".sgm", ".sgml", 
          ".shtml", ".spc", ".ssi", ".st", ".t", ".talk", ".tcl", ".tcsh", ".text", 
          ".textile", ".tr", ".tsv", ".txt", ".uil", ".uni", ".unis", ".uri", 
          ".uris", ".uu", ".uue", ".vcf", ".vcs", ".wml", ".wmls", ".wsc", 
          ".xht", ".xhtm", ".xhtml", ".yaml", ".yml", ".zsh"
        ]
      }
    }
  ]
}
bpasero commented 2 weeks ago

But where is the part that deals with opening said file? Would it require a URL that allows to do so, and how would it get the contents?