-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Persistant terminal session on tab refresh #2276
Comments
VSCode 1.51 has been released with support for "Ability to persist/reconnect to terminal sessions." might this actually fix this issue? |
Yes, I'm pretty sure it should! Will be working on this update soon.
|
I just installed code server v3.7.2 which contains the update to vscode 1.51 but sadly the terminal sessions are not persistent :( |
Sorry about that, we still need to implement the persistence. I have it
partially implemented but it doesn't work for things like htop or vim.
|
Any news on this? @code-asher Do you have a starting point so I can take a look? |
No updates. The code is all in https://github.com/cdr/code-server/blob/v3.8.1/lib/vscode/src/vs/server/node/channel.ts.
Here is where we force persistence off until we fix it:
https://github.com/cdr/code-server/blob/v3.8.1/lib/vscode/src/vs/server/node/channel.ts#L569
This is the code that tries to store the data:
https://github.com/cdr/code-server/blob/v3.8.1/lib/vscode/src/vs/server/node/channel.ts#L506-L543
And the code that tries to restore it:
https://github.com/cdr/code-server/blob/v3.8.1/lib/vscode/src/vs/server/node/channel.ts#L480-L488
It works for simple text printed to the terminal but it falls apart with
things like htop, vim, etc.
|
Thank you. I will send a PR if I get anywhere (but no promises). |
Ok, I found a related but different problem that was a bit more irritating. Terminal processes leak when refreshing the page. |
@outermeasure @code-asher Do you have any news about this? :) This would be super important since for example when your run Ansible from Code Server and your connection for what ever reason breaks being able to reconnect and still having the open terminal would be quite nice. |
Nope, we haven't done anything here yet. |
Most of this was a straightforward replacement of our code with theirs but I also removed `getDefaultShellAndArgs` since it seems the reference implementation no longer does that either. Fixes coder#2276.
Most of this was a straightforward replacement of our code with theirs but I also removed `getDefaultShellAndArgs` since it seems the reference implementation no longer does that either. Fixes coder#2276.
Now i use control+shift+p , then "Terminal: Attach to Session" to resume the terminal session I was working on. |
Eclipse Theia keeps any terminal sessions open when the tab is refreshed. Would it be possible to have this same functionality in code-server? Either enabled at all times, or with a flag.
The text was updated successfully, but these errors were encountered: