From 2d4a621400ca71891c76ff45887b36ad51a51683 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Tue, 2 Jan 2024 10:40:29 -0500 Subject: [PATCH] Just rerun cell initialization instead of duplicating code for each chat output type --- Source/Chatbook/SendChat.wl | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Source/Chatbook/SendChat.wl b/Source/Chatbook/SendChat.wl index 5249e805..03e08e8a 100644 --- a/Source/Chatbook/SendChat.wl +++ b/Source/Chatbook/SendChat.wl @@ -2297,14 +2297,7 @@ attachChatOutputMenu[ cell_CellObject ] /; $cloudNotebooks := Null; attachChatOutputMenu[ cell_CellObject ] := ( $lastChatOutput = cell; - NotebookDelete @ Cells[ cell, AttachedCell -> True, CellStyle -> "ChatMenu" ]; - AttachCell[ - cell, - Cell[ BoxData @ TemplateBox[ { "ChatOutput", RGBColor[ "#ecf0f5" ] }, "ChatMenuButton" ], "ChatMenu" ], - { Right, Top }, - Offset[ { -7, -7 }, { Right, Top } ], - { Right, Top } - ] + Block[ { EvaluationCell = cell & }, CurrentValue[ cell, Initialization ] ] ); attachChatOutputMenu // endDefinition;