From 18fe6831324a9252df540da653c6c31b090c08d4 Mon Sep 17 00:00:00 2001 From: Tom Szendrey Date: Thu, 21 Nov 2024 10:07:01 -0500 Subject: [PATCH] Fix reset kernel - Transform Dataset (#5586) Co-authored-by: Yohann Paris --- .../src/components/dataset/tera-dataset-jupyter-panel.vue | 1 - .../src/components/llm/tera-beaker-code-cell-output.vue | 8 ++++++++ .../hmi-client/src/components/llm/tera-jupyter-chat.vue | 6 +++--- .../src/components/llm/tera-jupyter-response.vue | 6 ++++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/client/hmi-client/src/components/dataset/tera-dataset-jupyter-panel.vue b/packages/client/hmi-client/src/components/dataset/tera-dataset-jupyter-panel.vue index 29d6ad2e96..1bbcb8e39e 100644 --- a/packages/client/hmi-client/src/components/dataset/tera-dataset-jupyter-panel.vue +++ b/packages/client/hmi-client/src/components/dataset/tera-dataset-jupyter-panel.vue @@ -166,7 +166,6 @@ const defaultPreview = computed(() => { props.assets.forEach((asset, index) => { code += `#d${index + 1} = ${asset.name}\n`; }); - // add first dataset to the code code += 'd1'; return code; diff --git a/packages/client/hmi-client/src/components/llm/tera-beaker-code-cell-output.vue b/packages/client/hmi-client/src/components/llm/tera-beaker-code-cell-output.vue index f29d648023..b08a5b02cc 100644 --- a/packages/client/hmi-client/src/components/llm/tera-beaker-code-cell-output.vue +++ b/packages/client/hmi-client/src/components/llm/tera-beaker-code-cell-output.vue @@ -49,6 +49,10 @@ const updateOutputs = () => { renderOutputs(outputs); }; +const clear = () => { + renderOutputs([]); +}; + onMounted(() => { updateOutputs(); }); @@ -61,6 +65,10 @@ watch( ); const messageType = computed(() => props.jupyterMessage.header.msg_type); + +defineExpose({ + clear +});