From e6fe7722208a4e57ba683e8da0a7c383fb4371af Mon Sep 17 00:00:00 2001 From: HellowVirgil <1135895008@qq.com> Date: Wed, 28 Jan 2026 16:06:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4saveNotebookContent?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E5=B9=B6=E5=8F=91=E5=9C=B0=E5=90=91?= =?UTF-8?q?=20Server=20=E5=8F=91=E9=80=81=20PUT=20=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=96=87=E4=BB=B6=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=20Server=20=E6=94=B6=E5=88=B0=20SIGTERM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../libro-jupyter/src/cell/jupyter-code-cell-view.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/libro-jupyter/src/cell/jupyter-code-cell-view.tsx b/packages/libro-jupyter/src/cell/jupyter-code-cell-view.tsx index b49698ad..80493afe 100644 --- a/packages/libro-jupyter/src/cell/jupyter-code-cell-view.tsx +++ b/packages/libro-jupyter/src/cell/jupyter-code-cell-view.tsx @@ -67,8 +67,7 @@ export class JupyterCodeCellView extends LibroCodeCellView { if (msgId) { if (kernelConnection.status === 'idle') { delete execution['libro_execution_msg_id']; - // 触发保存 - this.parent.model.saveNotebookContent(); + this.model.metadata = { ...this.model.metadata }; this.model.kernelExecuting = false; } else { this.model.kernelExecuting = true; @@ -82,8 +81,7 @@ export class JupyterCodeCellView extends LibroCodeCellView { ) { this.model.kernelExecuting = false; delete execution['libro_execution_msg_id']; - // 触发保存 - this.parent.model.saveNotebookContent(); + this.model.metadata = { ...this.model.metadata }; disposable.dispose(); } } @@ -95,8 +93,7 @@ export class JupyterCodeCellView extends LibroCodeCellView { if (status === 'idle') { this.model.kernelExecuting = false; delete execution['libro_execution_msg_id']; - // 触发保存 - this.parent.model.saveNotebookContent(); + this.model.metadata = { ...this.model.metadata }; disposable.dispose(); statusDisposable.dispose(); }