From 0f8aa44fce1dfa483cc67990796c0121f9bab231 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Wed, 27 Nov 2024 14:03:23 -0500 Subject: [PATCH] Bugfix: Make new code block templates work in cloud --- PacletInfo.wl | 2 +- Source/Chatbook/Formatting.wl | 35 ----------------------------------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/PacletInfo.wl b/PacletInfo.wl index c336b85e..31096f9b 100644 --- a/PacletInfo.wl +++ b/PacletInfo.wl @@ -1,7 +1,7 @@ PacletObject[ <| "Name" -> "Wolfram/Chatbook", "PublisherID" -> "Wolfram", - "Version" -> "1.5.2.11", + "Version" -> "1.5.2.12", "WolframVersion" -> "14.1+", "Description" -> "Wolfram Notebooks + LLMs", "License" -> "MIT", diff --git a/Source/Chatbook/Formatting.wl b/Source/Chatbook/Formatting.wl index 6cc149f5..e064ea2e 100644 --- a/Source/Chatbook/Formatting.wl +++ b/Source/Chatbook/Formatting.wl @@ -2159,48 +2159,13 @@ inlineInteractiveCodeCell // beginDefinition; inlineInteractiveCodeCell[ display_, string_ ] /; $dynamicText := display; -(* TODO: make this switch dynamically depending on $cloudNotebooks (likely as a TemplateBox)*) inlineInteractiveCodeCell[ display_, string_ ] := inlineInteractiveCodeCell[ display, string, contentLanguage @ string ]; -inlineInteractiveCodeCell[ display_, string_, lang_ ] /; $cloudNotebooks := - cloudInlineInteractiveCodeCell[ display, string, lang ]; - inlineInteractiveCodeCell[ display_, string_, lang_ ] := display; inlineInteractiveCodeCell // endDefinition; -(* ::**************************************************************************************************************:: *) -(* ::Subsubsection::Closed:: *) -(*cloudInlineInteractiveCodeCell*) -cloudInlineInteractiveCodeCell // beginDefinition; - -cloudInlineInteractiveCodeCell[ display_, string_, lang_ ] := - Module[ { padded, buttons }, - - padded = Pane[ display, ImageSize -> { { 100, Automatic }, { 30, Automatic } } ]; - - buttons = Framed[ - floatingButtonGrid[ string, lang ], - Background -> White, - FrameMargins -> { { 1, 0 }, { 0, 1 } }, - FrameStyle -> White, - ImageMargins -> 1, - RoundingRadius -> 3 - ]; - - Mouseover[ - buttonOverlay[ padded, Invisible @ buttons ], - buttonOverlay[ padded, buttons ], - ContentPadding -> False, - FrameMargins -> 0, - ImageMargins -> 0, - ImageSize -> All - ] - ]; - -cloudInlineInteractiveCodeCell // endDefinition; - (* ::**************************************************************************************************************:: *) (* ::Subsubsection::Closed:: *) (*buttonOverlay*)