Closed sfc-gh-sgiesecke closed 4 months ago
Same here
When a project is opened from Remote-SSH, no workspace information available through vscode api.
console.log("remoteName: " + JSON.stringify(vscode.env.remoteName));
console.log("workspaceFolders: " + JSON.stringify(vscode.workspace.workspaceFolders));
It prints this output:
remoteName: "ssh-remote"
workspaceFolders: undefined
I went through the vscode api, but didn’t find anything related to the Remote workspaces.
Then, I thought to check the source code of the Remote-SSH extension, so we should be able to know how it works. But the Remote-SSH extension is closed source.
Will need to think and investigate more about a possible way to obtain the remote workspace info.
References:
@jiakuan Hmm, did you try asking here? If it is not possible, then there should be a feature request at least.
No I haven't asked there yet. Given the closed source nature, I doubt if there will be a quick resolution in the near future.
However, it still seems a good idea to try asking in their issue list.
Can you try a local build of #23 to see if it is resolved there as well?
We have just released v0.2.0. Can you please check if the issue is resolved?
It mostly works, but I ran into a bug. I was trying out the settings a bit ("Branch Template" and "Branch Name is Prefix") and noticed that after I changed the setting, it would start repeating injected the portion.
I tried a few different settings and used Developer: Reload Window
to apply, and now I have:
[develop] - [develop foo] myfile.txt - my_workspace_name (Workspace) [SSH: my_hostname] - [develop]
This bug only seems to have when changing a setting and then reloading the window. If I reload again, it doesn't get better or worse. So I guess just closing VS Code and restarting it should fix it as long as I don't touch those extension settings anymore.
Restarting VS Code doesn't fix it. I still have my branch name tripled in my title.
Please edit your workspace title and remove any references to the branch name, then reload window. Since VS Code does not offer an API to manipulate window title in a fool-proof way, the extension relies on a hack to make it work.
Seems like that works. Thanks!
For local folders, the extension works fine as expected. However, for remote folders (via Remote-SSH in my case), it doesn't show the branch information. I guess this needs to be handled explicitly. Would it be possible to extend the extension to support that as well?