codepod-io / codepod

Codepod IDE: Scalable Interactive Coding
https://codepod.io
MIT License
71 stars 16 forks source link

properly update activeRuntime #499

Closed lihebi closed 12 months ago

lihebi commented 12 months ago

Now the active runtime should be set automatically when spawn/kill a runtime.

  1. if a runtime is deleted, and if it was the active runtime, set the active runtime to undefined
  2. if a runtime is added, and there's no active runtime, set the active runtime to the first runtime

495 also tried to fix it.