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

file open dialog #77

Closed
dyitzchaki-roku opened this issue Dec 12, 2023 · 1 comment
Closed

file open dialog #77

dyitzchaki-roku opened this issue Dec 12, 2023 · 1 comment
Assignees

Comments

@dyitzchaki-roku
Copy link

In addition to the pickFile command, it would be useful to have a command to show a file open dialog, using the window.showOpenDialog API.

I actually thought that's what pickFile do on first read.

That was also requested in VSCode quiet a while ago: microsoft/vscode#71461

@rioj7 rioj7 self-assigned this Dec 13, 2023
@rioj7 rioj7 closed this as completed in 8a2923a Dec 19, 2023
@rioj7
Copy link
Owner

rioj7 commented Dec 19, 2023

@dyitzchaki-roku see v1.61.0

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "echo Open Dialog",
      "type": "shell",
      "command": "echo",
      "args": [
        "${input:openDialog}"
      ],
      "problemMatcher": []
    }
  ],
  "inputs": [
    {
      "id": "openDialog",
      "type": "command",
      "command": "extension.commandvariable.file.openDialog",
      "args": {
        "canSelect": "files",
        "defaultUri": "${workspaceFolder}",
        "filters": {
          "Images": ["png", "jpg"],
          "TypeScript": ["ts", "tsx"]
        }
      }
    }
  ]
}

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

2 participants