Skip to content

Commit

Permalink
Just rerun cell initialization instead of duplicating code for each c…
Browse files Browse the repository at this point in the history
…hat output type
  • Loading branch information
rhennigan committed Jan 2, 2024
1 parent 90fdc08 commit 2d4a621
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Source/Chatbook/SendChat.wl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2d4a621

Please sign in to comment.