-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
[Feature]: VS Code button in Colab to directly open local VS Code instance into a pre-configured folder #116
Comments
So, I've done some digging into this on my own, and as much as I would like to make a Pull Request, I'm not entirely sure how to test and make sure there isn't any missing logic that might break functionality. I'll leave my findings here so you can build them into the project if you're interested, but if you would rather that I try and make a Pull Request, I'll try my best to work on it and build this functionality into the project. So there will be two new parameters that Inside the if vscode_build == 'stable':
link=f"vscode://vscode-remote/ssh-remote+root@{ssh_domain}:{ssh_port}{starting_directory}"
elif vscode_build == 'insiders':
link=f"vscode-insiders://vscode-remote/ssh-remote+root@{ssh_domain}:{ssh_port}{starting_directory}"
else:
print("Invalid vscode_build argument obtained!") (Note: The difference in the handler URI for users with the Stable VS Code build and the Insiders VS Code build, might be something you want to consider handling even for the I hope you would consider writing this functionality into the project, as I believe that some users, including myself, who work on specific directories (mounted Google Drive locations) in Colab will find this feature useful to automatically open into, every time. Greatly appreciate the work you've done with Colab SSH so far. It's by far, such a game changer in the way I use Google Colab for my work. |
Source Problem:
When I'm working with Colab, I store my project files on Google Drive under a particular folder. After initiating a Colab SSH connection and opening it from VS Code, I have to manually navigate through from the root folder on the Colab VM, all the way into my mounted Google Drive folder where my project files are stored to open them on VS Code and work with the files.
Feature Request:
I hope it'll be possible to specify a folder location (present on the VM) from the Colab Notebook, such that upon launching the SSH connection, I get a VS Code button (Similar to the GitHub VS Code button) to click and automatically open a VS Code instance on my local machine, opened to the previously specified folder on Colab.
Describe Alternatives You've Considered:
I have tried using the SSH Config command called
RemoteCommand
, to try andcd
into the folder I want while I'm connected to the Colab VM through VS Code, but this doesn't work, to begin with, and even if it did, it only changes the directory on the terminal and not the folder into which VS Code is opened.Additional Context:
For example, I'm looking to specify something like
launch_ssh_cloudflared(password=password, open_folder_path='/content/drive/MyDrive/Colab Notebooks/')
on the Colab Notebook while launching a SSH Tunnel, while it outputs a button like such upon execution:Upon clicking this button, I expect it to open VS Code instance on my local machine into the specified
Colab Notebooks
folder (in this example), like this:The text was updated successfully, but these errors were encountered: