Skip to content

Commit

Permalink
Merge pull request #964 from WolframResearch/feature/cloud-1.70-compa…
Browse files Browse the repository at this point in the history
…tibility

Cloud 1.70 compatibility
  • Loading branch information
rhennigan authored Nov 29, 2024
2 parents e2fa8b3 + 9868d26 commit a892fad
Show file tree
Hide file tree
Showing 9 changed files with 275 additions and 147 deletions.
2 changes: 1 addition & 1 deletion PacletInfo.wl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PacletObject[ <|
"Name" -> "Wolfram/Chatbook",
"PublisherID" -> "Wolfram",
"Version" -> "1.5.2.14",
"Version" -> "1.5.2.15",
"WolframVersion" -> "14.1+",
"Description" -> "Wolfram Notebooks + LLMs",
"License" -> "MIT",
Expand Down
16 changes: 11 additions & 5 deletions Source/Chatbook/CloudToolbar.wl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ toolbarButtonLabel // endDefinition;
insertStyleMenuItem // beginDefinition;

insertStyleMenuItem[ icon_String, style_, shortcut_ ] :=
insertStyleMenuItem[ chatbookIcon[ icon, False ], style, shortcut ];
insertStyleMenuItem[ chatbookIcon @ icon, style, shortcut ];

insertStyleMenuItem[ None, style_, shortcut_ ] :=
insertStyleMenuItem[ Spacer[ 0 ], style, shortcut ];
Expand Down Expand Up @@ -140,7 +140,7 @@ cloudPreferencesButton[ ] := Button[
toolbarButtonLabel @ Row @ {
tr[ "ChatToolbarChatSettings" ],
Spacer[ 5 ],
Dynamic @ RawBoxes @ FEPrivate`FrontEndResource[ "ChatbookExpressions", "AdvancedSettings" ]
chatbookExpression[ "AdvancedSettings" ]
},
toggleCloudPreferences @ EvaluationNotebook[ ],
FrameMargins -> { { 0, 4 }, { 0, 0 } }
Expand Down Expand Up @@ -197,7 +197,13 @@ $cloudPreferencesCell := $cloudPreferencesCell = Cell[
(* ::Subsubsection::Closed:: *)
(*createCloudPreferencesContent*)
createCloudPreferencesContent // beginDefinition;
createCloudPreferencesContent[ ] := createCloudPreferencesContent[ ] = createPreferencesContent[ ];

createCloudPreferencesContent[ ] /; ! $CloudEvaluation :=
Block[ { $CloudEvaluation = True }, createCloudPreferencesContent[ ] ];

createCloudPreferencesContent[ ] := createCloudPreferencesContent[ ] =
inlineChatbookExpressions @ createPreferencesContent[ ];

createCloudPreferencesContent // endDefinition;

(* ::**************************************************************************************************************:: *)
Expand Down Expand Up @@ -229,7 +235,7 @@ $chatDrivenNotebookLabel := Grid[
{
{
"",
chatbookIcon[ "ChatDrivenNotebookIcon", False ],
chatbookExpression[ "ChatDrivenNotebookIcon" ],
Style[ tr[ "ChatToolbarChatDrivenLabel" ], $notebookTypeLabelOptions ]
}
},
Expand All @@ -244,7 +250,7 @@ $chatEnabledNotebookLabel := Grid[
{
{
"",
chatbookIcon[ "ChatEnabledNotebookIcon", False ],
chatbookExpression[ "ChatEnabledNotebookIcon" ],
Style[ tr[ "ChatToolbarChatEnabledLabel" ], $notebookTypeLabelOptions ]
}
},
Expand Down
Loading

0 comments on commit a892fad

Please sign in to comment.