Skip to content

Commit 4806f7c

Browse files
authored
Merge pull request #920 from WolframResearch/915-printtemporary-cells-are-not-cleaned-up-after-a-chat-evaluation
Bugfix: Ensure `PrintTemporary` cells are cleaned up
2 parents 93a68ab + 5eb17b1 commit 4806f7c

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

Developer/Resources/WorkspaceStyles.wl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,15 @@ Cell[
336336
}
337337
]
338338

339+
(* ::**************************************************************************************************************:: *)
340+
(* ::Section::Closed:: *)
341+
(*Generated Styles*)
342+
Cell[
343+
StyleData[ "PrintTemporary" ],
344+
CellMargins -> { { 30, Inherited }, { Inherited, Inherited } },
345+
Selectable -> True
346+
]
347+
339348
(* ::**************************************************************************************************************:: *)
340349
(* ::Section::Closed:: *)
341350
(*Package Footer*)

FrontEnd/Assets/Extensions/CoreExtensions.nb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Notebook[
1111
Cell["Chatbook Core.nb Extensions", "Title"],
1212
Cell[
1313
StyleData["ChatStyleSheetInformation"],
14-
TaggingRules -> <|"StyleSheetVersion" -> "1.5.2.3940575613"|>
14+
TaggingRules -> <|"StyleSheetVersion" -> "1.5.2.3940579478"|>
1515
],
1616
Cell[
1717
StyleData["NotebookAssistant`Text"],

FrontEnd/StyleSheets/Chatbook.nb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ Notebook[
824824
],
825825
Cell[
826826
StyleData["ChatStyleSheetInformation"],
827-
TaggingRules -> <|"StyleSheetVersion" -> "1.5.2.3940575613"|>
827+
TaggingRules -> <|"StyleSheetVersion" -> "1.5.2.3940579478"|>
828828
],
829829
Cell[
830830
StyleData["NotebookAssistant`Text"],

FrontEnd/StyleSheets/Wolfram/WorkspaceChat.nb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Notebook[
7575
Cell[StyleData["CellExpression"], Selectable -> True],
7676
Cell[
7777
StyleData["WorkspaceChatStyleSheetInformation"],
78-
TaggingRules -> <|"WorkspaceChatStyleSheetVersion" -> "1.5.2.3940575613"|>
78+
TaggingRules -> <|"WorkspaceChatStyleSheetVersion" -> "1.5.2.3940579478"|>
7979
],
8080
Cell[
8181
StyleData[
@@ -412,6 +412,11 @@ Notebook[
412412
]
413413
])
414414
}
415+
],
416+
Cell[
417+
StyleData["PrintTemporary"],
418+
Selectable -> True,
419+
CellMargins -> {{30, Inherited}, {Inherited, Inherited}}
415420
]
416421
},
417422
StyleDefinitions -> "PrivateStylesheetFormatting.nb"

Source/Chatbook/Sandbox.wl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,8 @@ sessionEvaluate[ HoldComplete[ eval0_ ] ] := Enclose[
768768
]
769769
];
770770

771+
If[ $WorkspaceChat, NotebookDelete @ Cells[ $evaluationNotebook, CellStyle -> "PrintTemporary" ] ];
772+
771773
result = HoldComplete @@ ConfirmMatch[ Lookup[ response, "Result" ], _HoldComplete|_Hold, "Result" ];
772774
packets = TextPacket /@ response[ "OutputLog" ];
773775
initialized = result;

0 commit comments

Comments
 (0)