Skip to content

Commit

Permalink
Merge pull request #590 from WolframResearch/main
Browse files Browse the repository at this point in the history
Release v1.4.2
  • Loading branch information
rhennigan authored Feb 4, 2024
2 parents 99ef68c + 2bb8289 commit 6cd862a
Show file tree
Hide file tree
Showing 20 changed files with 573 additions and 301 deletions.
14 changes: 12 additions & 2 deletions Developer/Resources/Styles.wl
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,19 @@ Cell[
StyleKeyMapping -> { "~" -> "ChatDelimiter", "'" -> "ChatSystemInput", "Backspace" -> "ChatInput" },
TaggingRules -> <| "ChatNotebookSettings" -> <| "IncludeHistory" -> False |> |>,
CellDingbat -> Cell[
BoxData @ RowBox @ { ToBoxes @ $chatInputCellDingbat, TemplateBox[ { 12 }, "Spacer1" ] },
BoxData @ RowBox @ {
DynamicBox @ ToBoxes[
If[ TrueQ @ CloudSystem`$CloudNotebooks,
RawBoxes @ TemplateBox[ { }, "ChatIconUser" ],
RawBoxes @ TemplateBox[ { }, "ChatInputActiveCellDingbat" ]
],
StandardForm
],
TemplateBox[ { 12 }, "Spacer1" ]
},
CellFrame -> { { 0, 0 }, { 0, 2 } },
CellFrameMargins -> 5
CellFrameColor -> RGBColor[ "#a3c9f2" ],
CellFrameMargins -> 6
]
]

Expand Down
13 changes: 12 additions & 1 deletion Developer/StylesheetBuilder.wl
Original file line number Diff line number Diff line change
Expand Up @@ -566,12 +566,23 @@ $ChatbookStylesheet = Notebook[
(*BuildChatbookStylesheet*)


fixContexts[ expr_ ] := ResourceFunction[ "ReplaceContext" ][
expr,
{
"Wolfram`ChatbookStylesheetBuilder`" -> "Wolfram`ChatNB`",
"Wolfram`ChatbookStylesheetBuilder`Private`" -> "Wolfram`ChatNB`",
"$CellContext`" -> "Wolfram`ChatNB`",
$Context -> "Wolfram`ChatNB`"
}
];


BuildChatbookStylesheet[ ] := BuildChatbookStylesheet @ $styleSheetTarget;

BuildChatbookStylesheet[ target_ ] :=
Block[ { $Context = "Global`", $ContextPath = { "System`", "Global`" } },
Module[ { exported },
exported = Export[ target, $ChatbookStylesheet, "NB" ];
exported = Export[ target, fixContexts @ $ChatbookStylesheet, "NB" ];
PacletInstall[ "Wolfram/PacletCICD" ];
Needs[ "Wolfram`PacletCICD`" -> None ];
SetOptions[
Expand Down
Loading

0 comments on commit 6cd862a

Please sign in to comment.