feat: support cell restore executing msg #490
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of the changes and the motivation behind them. Also, include any relevant context or links to related issues.
Type of Change
Please mark the type of change:
Related Issues
Please list any issues related to this pull request (e.g.,
Fixes #123,Closes #456).Testing
Please describe the tests that were performed to verify your changes. Include details about the testing framework, if applicable.
Checklist
Additional Notes
默认情况下,Cell 的“正在运行”状态和消息监听是保存在前端组件的内存中的。当页面刷新或组件重新加载时,内存数据丢失,虽然 Kernel 后端还在跑任务,但前端已经不知道是谁在跑,导致 UI 显示为静止,且无法接收后续的输出。
本 PR 将每次执行请求的唯一标识符 ( msg_id ) 写入到 Cell 的 metadata 中,在刷新页面后,根据存储的 msg_id 去 Kernel 的广播频道里认领属于这个 Cell 的消息,并恢复 output 输出。