Skip to content

Commit ec33520

Browse files
authored
Merge pull request #1387 from WolframResearch/bugfix/Sidebar14
Bugfix: use CellStyle to gather "top level" cells in the sidebar
2 parents bd89c87 + 8b349fe commit ec33520

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Chatbook/SendChat.wl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,10 +2074,10 @@ selectChatCells[ as_Association? AssociationQ, cell_CellObject, nbo_NotebookObje
20742074
]
20752075
},
20762076
$selectedChatCells = If[ MatchQ[ appContainer, _CellObject ] && cellTaggedQ[ appContainer, "NotebookAssistantSidebarCell" ],
2077-
(* 15.0: if in a new side bar chat, then there is no scrolling cell, so fail gracefully (in reality we should have added one when sending the first chat) *)
2077+
(* 15.0: if in a new side bar chat, the scrolling cell may contain cells with UUID as their cell tag so use CellStyle to get them instead *)
20782078
With[
20792079
{ scrollingCell = First[ Cells[ appContainer, CellTags -> "SidebarScrollingContentCell" ], Missing @ "NoSidebarScrollingContentCell" ] },
2080-
{ sidebarCells = If[ MissingQ @ scrollingCell, { }, Cells[ scrollingCell, CellTags -> "SidebarTopCell" ] ] },
2080+
{ sidebarCells = If[ MissingQ @ scrollingCell, { }, Cells[ scrollingCell, CellStyle -> {"NotebookAssistant`Sidebar`ChatInput", "NotebookAssistant`Sidebar`ChatOutput" } ] ] },
20812081
(* at minimum, the input cell should be present, so selectChatCells0 will have an internal error otherwise *)
20822082
selectChatCells0[ cell, sidebarCells ]
20832083
],

0 commit comments

Comments
 (0)