diff --git a/Source/Chatbook/Formatting.wl b/Source/Chatbook/Formatting.wl index 64ee2291..c51ed9bc 100644 --- a/Source/Chatbook/Formatting.wl +++ b/Source/Chatbook/Formatting.wl @@ -293,6 +293,9 @@ makeResultCell0[ inlineCodeCell[ code_String ] ] := ReplaceAll[ makeResultCell0[ mathCell[ math_String ] ] /; StringMatchQ[ math, (DigitCharacter|"."|","|" ").. ] := math; +makeResultCell0[ mathCell[ name_String ] ] /; NameQ @ name && Context @ name === "System`" && StringLength @ name > 1 := + makeResultCell0 @ inlineCodeCell @ name; + makeResultCell0[ mathCell[ math_String ] ] := With[ { boxes = makeTeXBoxes @ math }, If[ MatchQ[ boxes, _RawBoxes ], @@ -1907,7 +1910,7 @@ makeLabeledBlockCell0[ code_String, "Input" ] := makeInteractiveCodeCell[ "Wolfram", code ]; makeLabeledBlockCell0[ code_String, style_String ] := - Cell[ BoxData @ code, style ]; + Cell[ BoxData @ StringToBoxes[ code, "WL" ], style ]; makeLabeledBlockCell0 // endDefinition; diff --git a/Source/Chatbook/Prompting.wl b/Source/Chatbook/Prompting.wl index 0d9196a5..a9a4cab8 100644 --- a/Source/Chatbook/Prompting.wl +++ b/Source/Chatbook/Prompting.wl @@ -193,7 +193,8 @@ $basePromptComponents[ "MarkdownImageBox" ] = "\ * If there are images embedded in the notebook, they will be replaced by a box representation in the form \ ``MarkdownImageBox[\"![label](attachment://content-id)\"]``. You will also receive the original image immediately \ after this. You can use the markdown from this box ``![label](attachment://content-id)`` in your responses if you \ -want to display the original image."; +want to display the original image. The user is not aware of the existence of MarkdownImageBoxes, since they just see \ +an image, so avoid talking about these directly."; $basePromptComponents[ "MarkdownImageBoxImporting" ] = "\ * Use the syntax to inline one of these images in code you write for the evaluator \