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

Detect reloading of VSCode #41

Open
Splines opened this issue Oct 27, 2024 · 0 comments
Open

Detect reloading of VSCode #41

Splines opened this issue Oct 27, 2024 · 0 comments

Comments

@Splines
Copy link
Member

Splines commented Oct 27, 2024

Users can reload the VSCode window and the terminal session stays open and with this also the ManimGL Preview window. However, as described in #30 we have this known limitation:

Reloading the VSCode window while having a Manim session open, then interacting with the extension is not a supported use case. Here, the current implementation will spawn a new terminal with a completely new session instead of reusing the existing one. In this case, users can just close the old session and that's it. This shouldn't really be a limitation.

As a solution to this issue, we could get the automatic Manim detection to work even when reloading the window. This would probably involve browsing the history of a terminal to see if the Manim welcome string is included and if a IPython terminal session is running. But the question here is how we detect that this session is still in use? We could say: well, the In [42]: IPython cell string should be the last data we received from the terminal. But then we have to also deal with edge cases, e.g. when -- after the reload -- a Manim preview is still running (was started before the reload) and outputs something to the terminal (is this scenario even possible?). Another question is if it's even possible to get the terminal data stream for a terminal that was reopened since the window was reloaded.

Or we just ignore and acknowledge this as limitation. But then we might think of ways to tell the users that they should close their remaining Manim sessions when a VSCode window is reloaded. However, I would find it very annoying if a popup indicated Close remaining Manim session every time I reload a window, even though I'm not even working with anything Manim-related (just have the extension installed).

@Splines Splines changed the title Detect reloading of window Detect reloading of VSCode Oct 27, 2024
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

1 participant