Skip to content

Commit

Permalink
Merge pull request #754 from WolframResearch/main
Browse files Browse the repository at this point in the history
Release v1.4.8
  • Loading branch information
rhennigan authored Aug 1, 2024
2 parents 1a317a5 + b14744b commit 6ddc474
Show file tree
Hide file tree
Showing 24 changed files with 510 additions and 233 deletions.
Binary file modified Assets/DisplayFunctions.wxf
Binary file not shown.
Binary file modified Assets/Icons.wxf
Binary file not shown.
19 changes: 6 additions & 13 deletions Developer/Resources/Icons/SendChatButton.wl
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,29 @@ Function[
{
False ->
Button[
RawBoxes @ TemplateBox[ { #1, #2 }, "SendChatButtonLabel" ],
RawBoxes @ TemplateBox[ { #1, #2, #3 }, "SendChatButtonLabel" ],
Wolfram`Chatbook`$ChatEvaluationCell = cell;
SelectionMove[ cell, All, Cell ];
FrontEndTokenExecute[ Notebooks @ cell, "EvaluateCells" ],
Appearance -> "Suppressed",
FrameMargins -> 0,
Method -> "Queued"
],
True ->
Button[
Overlay[
{
RawBoxes @ TemplateBox[ { #2 }, "ChatEvaluatingSpinner" ],
Graphics[
{ RGBColor[ 0.71373, 0.054902, 0.0 ], Rectangle[ { -0.5, -0.5 }, { 0.5, 0.5 } ] },
ImageSize -> #2,
PlotRange -> 1.1
]
},
Alignment -> { Center, Center }
],
RawBoxes @ TemplateBox[ { #1, #2, #3 }, "StopChatButtonLabel" ],
If[ Wolfram`Chatbook`$ChatEvaluationCell =!= cell,
NotebookWrite[ cell, NotebookRead @ cell, None, AutoScroll -> False ],
Needs[ "Wolfram`Chatbook`" -> None ];
Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "StopChat" ]
],
Appearance -> "Suppressed",
FrameMargins -> 0
]
},
Dynamic[ Wolfram`Chatbook`$ChatEvaluationCell === cell ],
Alignment -> { Automatic, Baseline }
Alignment -> { Automatic, Baseline },
ImageSize -> Automatic
],
Initialization :> (cell = If[ $CloudEvaluation, x; EvaluationCell[ ], ParentCell @ EvaluationCell[ ] ]),
DynamicModuleValues :> { },
Expand Down
189 changes: 133 additions & 56 deletions Developer/Resources/Icons/SendChatButtonLabel.wl
Original file line number Diff line number Diff line change
@@ -1,62 +1,139 @@
Function[
Graphics[
{
Thickness[ 0.055556 ],
FaceForm[ #1 ],
FilledCurve[
{
MouseAppearance[
Mouseover[
Framed[
Graphics[
{
{ 0, 2, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 }
}
},
{
Thickness[ 0.055556 ],
FaceForm[ #1 ],
FilledCurve[
{
{
{ 0, 2, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 }
}
},
{
{
{ 16.027, 14.999 },
{ 1.9266, 14.502 },
{ 1.0396, 14.472 },
{ 0.6156, 13.398 },
{ 1.2516, 12.793 },
{ 4.3856, 9.8123 },
{ 4.6816, 9.5303 },
{ 5.1256, 9.4603 },
{ 5.5026, 9.6363 },
{ 9.1226, 11.324 },
{ 9.3736, 11.441 },
{ 9.6716, 11.336 },
{ 9.7866, 11.088 },
{ 9.9026, 10.84 },
{ 9.7916, 10.545 },
{ 9.5406, 10.428 },
{ 5.9206, 8.7393 },
{ 5.5436, 8.5643 },
{ 5.3116, 8.1793 },
{ 5.3376, 7.7713 },
{ 5.6066, 3.4543 },
{ 5.6606, 2.5783 },
{ 6.7556, 2.2123 },
{ 7.3496, 2.8723 },
{ 16.794, 13.354 },
{ 17.382, 14.007 },
{ 16.905, 15.03 },
{ 16.027, 14.999 }
}
}
]
},
AspectRatio -> Automatic,
ImageSize -> #3,
PlotRange -> { { -0.5, 18.5 }, { -0.5, 18.5 } }
],
FrameStyle -> GrayLevel[ 1 ],
Background -> GrayLevel[ 1 ],
RoundingRadius -> 3,
FrameMargins -> 1
],
Framed[
Graphics[
{
{ 16.027, 14.999 },
{ 1.9266, 14.502 },
{ 1.0396, 14.472 },
{ 0.6156, 13.398 },
{ 1.2516, 12.793 },
{ 4.3856, 9.8123 },
{ 4.6816, 9.5303 },
{ 5.1256, 9.4603 },
{ 5.5026, 9.6363 },
{ 9.1226, 11.324 },
{ 9.3736, 11.441 },
{ 9.6716, 11.336 },
{ 9.7866, 11.088 },
{ 9.9026, 10.84 },
{ 9.7916, 10.545 },
{ 9.5406, 10.428 },
{ 5.9206, 8.7393 },
{ 5.5436, 8.5643 },
{ 5.3116, 8.1793 },
{ 5.3376, 7.7713 },
{ 5.6066, 3.4543 },
{ 5.6606, 2.5783 },
{ 6.7556, 2.2123 },
{ 7.3496, 2.8723 },
{ 16.794, 13.354 },
{ 17.382, 14.007 },
{ 16.905, 15.03 },
{ 16.027, 14.999 }
}
}
Thickness[ 0.055556 ],
FaceForm[ #1 ],
FilledCurve[
{
{
{ 0, 2, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 },
{ 0, 1, 0 },
{ 1, 3, 3 }
}
},
{
{
{ 16.027, 14.999 },
{ 1.9266, 14.502 },
{ 1.0396, 14.472 },
{ 0.6156, 13.398 },
{ 1.2516, 12.793 },
{ 4.3856, 9.8123 },
{ 4.6816, 9.5303 },
{ 5.1256, 9.4603 },
{ 5.5026, 9.6363 },
{ 9.1226, 11.324 },
{ 9.3736, 11.441 },
{ 9.6716, 11.336 },
{ 9.7866, 11.088 },
{ 9.9026, 10.84 },
{ 9.7916, 10.545 },
{ 9.5406, 10.428 },
{ 5.9206, 8.7393 },
{ 5.5436, 8.5643 },
{ 5.3116, 8.1793 },
{ 5.3376, 7.7713 },
{ 5.6066, 3.4543 },
{ 5.6606, 2.5783 },
{ 6.7556, 2.2123 },
{ 7.3496, 2.8723 },
{ 16.794, 13.354 },
{ 17.382, 14.007 },
{ 16.905, 15.03 },
{ 16.027, 14.999 }
}
}
]
},
AspectRatio -> Automatic,
ImageSize -> #3,
PlotRange -> { { -0.5, 18.5 }, { -0.5, 18.5 } }
],
FrameStyle -> #1,
Background -> #2,
RoundingRadius -> 3,
FrameMargins -> 1
]
},
AspectRatio -> Automatic,
ImageSize -> #2,
PlotRange -> { { -0.5, 18.5 }, { -0.5, 18.5 } }
],
"LinkHand"
]
]
41 changes: 41 additions & 0 deletions Developer/Resources/Icons/StopChatButtonLabel.wl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Function[
MouseAppearance[
Mouseover[
Framed[
Overlay[
{
RawBoxes @ TemplateBox[ { #3 }, "ChatEvaluatingSpinner" ],
Graphics[
{ RGBColor[ 0.71373, 0.054902, 0.0 ], Rectangle[ { -0.5, -0.5 }, { 0.5, 0.5 } ] },
ImageSize -> #3,
PlotRange -> 1.1
]
},
Alignment -> { Center, Center }
],
FrameStyle -> GrayLevel[ 1 ],
Background -> GrayLevel[ 1 ],
RoundingRadius -> 3,
FrameMargins -> 1
],
Framed[
Overlay[
{
RawBoxes @ TemplateBox[ { #3 }, "ChatEvaluatingSpinner" ],
Graphics[
{ RGBColor[ 0.71373, 0.054902, 0.0 ], Rectangle[ { -0.5, -0.5 }, { 0.5, 0.5 } ] },
ImageSize -> #3,
PlotRange -> 1.1
]
},
Alignment -> { Center, Center }
],
FrameStyle -> #1,
Background -> #2,
RoundingRadius -> 3,
FrameMargins -> 1
]
],
"LinkHand"
]
]
16 changes: 11 additions & 5 deletions Developer/Resources/Styles.wl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,13 @@ Cell[
StyleKeyMapping -> { "~" -> "ChatDelimiter", "'" -> "SideChat", "=" -> "WolframAlphaShort", "*" -> "Item" },
TaggingRules -> <| "ChatNotebookSettings" -> <| |> |>,
CellFrameLabels -> {
{ None, Cell[ BoxData @ TemplateBox[ { RGBColor[ "#a3c9f2" ], 20 }, "SendChatButton" ], Background -> None ] },
{
None,
Cell[
BoxData @ TemplateBox[ { RGBColor[ "#a3c9f2" ], RGBColor[ "#f1f7fd" ], 20 }, "SendChatButton" ],
Background -> None
]
},
{ None, None }
},
CellDingbat -> Cell[
Expand Down Expand Up @@ -1135,7 +1141,7 @@ Cell[
DisplayFunction -> (
NamespaceBox["ChatbookPersonaID",
DynamicModuleBox[{},
DynamicBox[ToBoxes @ Wolfram`Chatbook`InlineReferences`personaTemplateBoxes[1, #input, #state, #uuid]],
DynamicBox[ToBoxes @ Wolfram`Chatbook`Common`personaTemplateBoxes[1, #input, #state, #uuid]],
Initialization :> (
Quiet @ Needs[ "Wolfram`Chatbook`" -> None ];
Wolfram`Chatbook`InlineReferences`Private`$lastInlineReferenceCell = EvaluationCell[ ]
Expand All @@ -1157,7 +1163,7 @@ Cell[
DisplayFunction -> (
NamespaceBox["ChatbookModifierID",
DynamicModuleBox[{},
DynamicBox[ToBoxes @ Wolfram`Chatbook`InlineReferences`modifierTemplateBoxes[1, #input, #params, #state, #uuid]],
DynamicBox[ToBoxes @ Wolfram`Chatbook`Common`modifierTemplateBoxes[1, #input, #params, #state, #uuid]],
Initialization :> (
Quiet @ Needs[ "Wolfram`Chatbook`" -> None ];
Wolfram`Chatbook`InlineReferences`Private`$lastInlineReferenceCell = EvaluationCell[ ]
Expand All @@ -1179,7 +1185,7 @@ Cell[
DisplayFunction -> (
NamespaceBox["ChatbookFunctionID",
DynamicModuleBox[{},
DynamicBox[ToBoxes @ Wolfram`Chatbook`InlineReferences`functionTemplateBoxes[1, #input, #params, #state, #uuid]],
DynamicBox[ToBoxes @ Wolfram`Chatbook`Common`functionTemplateBoxes[1, #input, #params, #state, #uuid]],
Initialization :> (
Quiet @ Needs[ "Wolfram`Chatbook`" -> None ];
Wolfram`Chatbook`InlineReferences`Private`$lastInlineReferenceCell = EvaluationCell[ ]
Expand All @@ -1201,7 +1207,7 @@ Cell[
DisplayFunction -> (
NamespaceBox["ChatbookWLTemplateID",
DynamicModuleBox[{},
DynamicBox[ToBoxes @ Wolfram`Chatbook`InlineReferences`wlTemplateBoxes[1, #input, #state, #uuid]],
DynamicBox[ToBoxes @ Wolfram`Chatbook`Common`wlTemplateBoxes[1, #input, #state, #uuid]],
Initialization :> (
Quiet @ Needs[ "Wolfram`Chatbook`" -> None ];
Wolfram`Chatbook`InlineReferences`Private`$lastInlineReferenceCell = EvaluationCell[ ]
Expand Down
20 changes: 6 additions & 14 deletions Developer/Resources/WorkspaceStyles.wl
Original file line number Diff line number Diff line change
Expand Up @@ -134,32 +134,24 @@ Cell[
DisplayFunction -> Function @ Evaluate @ ToBoxes @ PaneSelector[
{
None -> Button[
RawBoxes @ TemplateBox[ { #1, #2 }, "SendChatButtonLabel" ],
RawBoxes @ TemplateBox[ { #1, #2, #3 }, "SendChatButtonLabel" ],
Needs[ "Wolfram`Chatbook`" -> None ];
Symbol[ "Wolfram`Chatbook`ChatbookAction" ][
"EvaluateWorkspaceChat",
#3,
Dynamic @ CurrentValue[ #3, { TaggingRules, "ChatInputString" } ]
#4,
Dynamic @ CurrentValue[ #4, { TaggingRules, "ChatInputString" } ]
],
Appearance -> "Suppressed",
FrameMargins -> 0,
Method -> "Queued"
]
},
Dynamic @ Wolfram`Chatbook`$ChatEvaluationCell,
Button[
Overlay[
{
RawBoxes @ TemplateBox[ { #2 }, "ChatEvaluatingSpinner" ],
Graphics[
{ RGBColor[ 0.71373, 0.054902, 0.0 ], Rectangle[ { -0.5, -0.5 }, { 0.5, 0.5 } ] },
ImageSize -> #2,
PlotRange -> 1.1
]
},
Alignment -> { Center, Center }
],
RawBoxes @ TemplateBox[ { #1, #2, #3 }, "StopChatButtonLabel" ],
Needs[ "Wolfram`Chatbook`" -> None ];
Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "StopChat" ],
Appearance -> "Suppressed",
FrameMargins -> 0
],
Alignment -> { Automatic, Baseline }
Expand Down
Loading

0 comments on commit 6ddc474

Please sign in to comment.