From 977e14e55de0aef04f7025579f4ce9564c168a10 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Fri, 19 May 2023 15:16:58 -0400 Subject: [PATCH 01/14] Add persona menu cell dingbat to chat delimiter cells and adjust margins --- Developer/Resources/Styles.wl | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/Developer/Resources/Styles.wl b/Developer/Resources/Styles.wl index 38b7254f..67cc9202 100644 --- a/Developer/Resources/Styles.wl +++ b/Developer/Resources/Styles.wl @@ -87,10 +87,6 @@ Cell[ MenuSortingValue -> 1000, StyleKeyMapping -> { "~" -> "ChatDelimiter", "'" -> "SideChat", "Backspace" -> "Input" }, CellDingbat -> Cell[ - (* BoxData @ RowBox[{ - TemplateBox[{}, "ChatCounterLabel"], - ToBoxes @ $chatInputCellDingbat - }], *) BoxData @ DynamicBox @ ToBoxes[ If[ TrueQ @ CloudSystem`$CloudNotebooks, RawBoxes @ TemplateBox[ { }, "RoleUser" ], @@ -271,7 +267,20 @@ Cell[ StyleKeyMapping -> { "~" -> "ChatDelimiter", "'" -> "ChatInput" }, - menuInitializer[ "ChatSection", GrayLevel[ 0.925 ] ] + menuInitializer[ "ChatSection", GrayLevel[ 0.925 ] ], + + CellDingbat -> Cell[ + BoxData @ DynamicBox @ ToBoxes[ + If[ TrueQ @ CloudSystem`$CloudNotebooks, + RawBoxes @ TemplateBox[ { }, "RoleUser" ], + RawBoxes @ TemplateBox[ { }, "ChatInputActiveCellDingbat" ] + ], + StandardForm + ], + Background -> None, + CellFrame -> 0, + CellMargins -> 0 + ] ] (* ::**************************************************************************************************************:: *) @@ -283,7 +292,7 @@ Cell[ CellElementSpacings -> { "CellMinHeight" -> 6 }, CellFrameMargins -> { { 20, 20 }, { 2, 2 } }, CellGroupingRules -> { "SectionGrouping", 62 }, - CellMargins -> { { 0, 0 }, { 10, 10 } }, + CellMargins -> { { 5, 0 }, { 10, 10 } }, CellTrayWidgets -> <| "ChatWidget" -> <| "Visible" -> False |> |>, CounterAssignments -> { { "ChatInputCount", 0 } }, DefaultNewCellStyle -> "Input", @@ -309,7 +318,18 @@ Cell[ CellFrameLabels -> { { - None, + Cell[ + BoxData @ DynamicBox @ ToBoxes[ + If[ TrueQ @ CloudSystem`$CloudNotebooks, + RawBoxes @ TemplateBox[ { }, "RoleUser" ], + RawBoxes @ TemplateBox[ { }, "ChatInputActiveCellDingbat" ] + ], + StandardForm + ], + Background -> None, + CellFrame -> 0, + CellMargins -> 0 + ], Cell[ BoxData @ TemplateBox[ { "ChatSection", GrayLevel[ 0.925 ] }, "ChatMenuButton" ], "ChatMenu", From ef5fd2410ac20fb598f866acf7298027c29b50af Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 10:51:50 -0400 Subject: [PATCH 02/14] Added `$cloudNotebooks` in order to override cloud notebook workarounds --- Source/Chatbook/Actions.wl | 14 +++++++------- Source/Chatbook/Common.wl | 7 +++++-- Source/Chatbook/CreateChatNotebook.wl | 4 ++-- Source/Chatbook/Formatting.wl | 4 ++-- Source/Chatbook/FrontEnd.wl | 12 ++++++------ Source/Chatbook/InlineReferences.wl | 2 +- Source/Chatbook/UI.wl | 2 +- 7 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Source/Chatbook/Actions.wl b/Source/Chatbook/Actions.wl index 937f2624..87caab6b 100644 --- a/Source/Chatbook/Actions.wl +++ b/Source/Chatbook/Actions.wl @@ -142,7 +142,7 @@ TabRight // endDefinition; (* ::Subsection::Closed:: *) (*rotateTabPage*) rotateTabPage // beginDefinition; -rotateTabPage[ cell_CellObject, n_Integer ] /; CloudSystem`$CloudNotebooks := rotateTabPage0[ cell, n ]; +rotateTabPage[ cell_CellObject, n_Integer ] /; $cloudNotebooks := rotateTabPage0[ cell, n ]; rotateTabPage[ cell_CellObject, n_Integer ] := rotateTabPage0[ parentCell @ cell, n ]; rotateTabPage // endDefinition; @@ -219,7 +219,7 @@ waitForLastTask // endDefinition; (*AIAutoAssist*) AIAutoAssist // beginDefinition; -AIAutoAssist[ cell_ ] /; CloudSystem`$CloudNotebooks := Null; +AIAutoAssist[ cell_ ] /; $cloudNotebooks := Null; AIAutoAssist[ cell_CellObject ] := AIAutoAssist[ cell, parentNotebook @ cell ]; @@ -630,7 +630,7 @@ SendChat[ evalCell_CellObject, nbo_NotebookObject ] := SendChat[ evalCell_CellObject, nbo_NotebookObject, settings_Association? AssociationQ ] := SendChat[ evalCell, nbo, settings, Lookup[ settings, "ShowMinimized", Automatic ] ]; -SendChat[ evalCell_, nbo_, settings_, Automatic ] /; CloudSystem`$CloudNotebooks := +SendChat[ evalCell_, nbo_, settings_, Automatic ] /; $cloudNotebooks := SendChat[ evalCell, nbo, settings, False ]; SendChat[ evalCell_, nbo_, settings_, Automatic ] := withBasePromptBuilder @ @@ -725,7 +725,7 @@ sendChat[ evalCell_, nbo_, settings0_ ] := catchTopAs[ ChatbookAction ] @ Enclos $resultCellCache = <| |>; $debugLog = Internal`Bag[ ]; - If[ ! TrueQ @ CloudSystem`$CloudNotebooks && chatInputCellQ @ evalCell, + If[ ! TrueQ @ $cloudNotebooks && chatInputCellQ @ evalCell, SetOptions[ evalCell, CellDingbat -> Cell[ BoxData @ TemplateBox[ { }, "ChatInputCellDingbat" ], Background -> None ] @@ -949,7 +949,7 @@ activeAIAssistantCell[ container_, settings: KeyValuePattern[ "CellObject" :> cellObject_ ], minimized_ -] /; CloudSystem`$CloudNotebooks := +] /; $cloudNotebooks := With[ { label = RawBoxes @ TemplateBox[ { }, "MinimizedChatActive" ], @@ -1637,7 +1637,7 @@ clearMinimizedChats // beginDefinition; clearMinimizedChats[ nbo_NotebookObject ] := clearMinimizedChats[ nbo, Cells @ nbo ]; -clearMinimizedChats[ nbo_, cells_ ] /; CloudSystem`$CloudNotebooks := cells; +clearMinimizedChats[ nbo_, cells_ ] /; $cloudNotebooks := cells; clearMinimizedChats[ nbo_NotebookObject, cells_List ] := Module[ { outCells, closed, attached }, @@ -2479,7 +2479,7 @@ makeReformattedCellTaggingRules // endDefinition; (*makeCompactChatData*) makeCompactChatData // beginDefinition; -makeCompactChatData[ message_, tag_, as_ ] /; CloudSystem`$CloudNotebooks := Inherited; +makeCompactChatData[ message_, tag_, as_ ] /; $cloudNotebooks := Inherited; makeCompactChatData[ message_, diff --git a/Source/Chatbook/Common.wl b/Source/Chatbook/Common.wl index ae1fdab8..572e4f1d 100644 --- a/Source/Chatbook/Common.wl +++ b/Source/Chatbook/Common.wl @@ -3,6 +3,7 @@ (*Package Header*) BeginPackage[ "Wolfram`Chatbook`Common`" ]; +`$cloudNotebooks; `$maxChatCells; `$closedChatCellOptions; @@ -31,6 +32,8 @@ Begin[ "`Private`" ]; Needs[ "Wolfram`Chatbook`" ]; +$cloudNotebooks := TrueQ @ CloudSystem`$CloudNotebooks; + (* ::**************************************************************************************************************:: *) (* ::Section::Closed:: *) (*Config*) @@ -43,7 +46,7 @@ $excludeHistoryStyles = { "SideChat" }; $maxChatCells := OptionValue[ CreateChatNotebook, "ChatHistoryLength" ]; $closedChatCellOptions := - If[ TrueQ @ CloudSystem`$CloudNotebooks, + If[ TrueQ @ $cloudNotebooks, Sequence @@ { }, Sequence @@ { CellMargins -> -2, CellOpen -> False, CellFrame -> 0, ShowCellBracket -> False } ]; @@ -355,7 +358,7 @@ Delimiters -> "%%" (* ::Subsubsection::Closed:: *) (*$frontEndVersion*) $frontEndVersion := - If[ TrueQ @ CloudSystem`$CloudNotebooks, + If[ TrueQ @ $cloudNotebooks, StringJoin[ "Cloud: ", ToString @ $CloudVersion ], StringJoin[ "Desktop: ", ToString @ UsingFrontEnd @ SystemInformation[ "FrontEnd", "Version" ] ] ]; diff --git a/Source/Chatbook/CreateChatNotebook.wl b/Source/Chatbook/CreateChatNotebook.wl index 21978269..d8ccb2a2 100644 --- a/Source/Chatbook/CreateChatNotebook.wl +++ b/Source/Chatbook/CreateChatNotebook.wl @@ -52,7 +52,7 @@ CreateChatNotebook[ nbo_NotebookObject, opts: OptionsPattern[ { CreateChatNotebo (* ::Subsection::Closed:: *) (*createChatNotebook*) createChatNotebook // SetFallthroughError; -createChatNotebook[ opts___ ] /; CloudSystem`$CloudNotebooks := createCloudChatNotebook @ opts; +createChatNotebook[ opts___ ] /; $cloudNotebooks := createCloudChatNotebook @ opts; createChatNotebook[ opts___ ] := createLocalChatNotebook @ opts; (* ::**************************************************************************************************************:: *) @@ -124,7 +124,7 @@ makeChatNotebookOptions[ settings_Association, opts: OptionsPattern[ ] ] := Sequ (* ::**************************************************************************************************************:: *) (* ::Subsubsection::Closed:: *) (*$chatbookStylesheet*) -$chatbookStylesheet := If[ TrueQ @ CloudSystem`$CloudNotebooks, $inlinedStylesheet, "Chatbook.nb" ]; +$chatbookStylesheet := If[ TrueQ @ $cloudNotebooks, $inlinedStylesheet, "Chatbook.nb" ]; $inlinedStylesheet := $inlinedStylesheet = Import[ FileNameJoin @ { diff --git a/Source/Chatbook/Formatting.wl b/Source/Chatbook/Formatting.wl index 6e9165e2..0d103262 100644 --- a/Source/Chatbook/Formatting.wl +++ b/Source/Chatbook/Formatting.wl @@ -415,10 +415,10 @@ inlineInteractiveCodeCell // beginDefinition; inlineInteractiveCodeCell[ display_, string_ ] /; $dynamicText := display; -inlineInteractiveCodeCell[ display_, string_String ] /; CloudSystem`$CloudNotebooks := +inlineInteractiveCodeCell[ display_, string_String ] /; $cloudNotebooks := Button[ display, CellPrint @ Cell[ BoxData @ string, "Input" ], Appearance -> None ]; -inlineInteractiveCodeCell[ display_, cell_Cell ] /; CloudSystem`$CloudNotebooks := +inlineInteractiveCodeCell[ display_, cell_Cell ] /; $cloudNotebooks := Button[ display, CellPrint @ cell, Appearance -> None ]; inlineInteractiveCodeCell[ display_, string_ ] := diff --git a/Source/Chatbook/FrontEnd.wl b/Source/Chatbook/FrontEnd.wl index 0b173de6..096905a8 100644 --- a/Source/Chatbook/FrontEnd.wl +++ b/Source/Chatbook/FrontEnd.wl @@ -84,7 +84,7 @@ cellInformation // endDefinition; (* ::Subsection::Closed:: *) (*parentCell*) parentCell // beginDefinition; -parentCell[ cell_CellObject ] /; CloudSystem`$CloudNotebooks := cell; +parentCell[ cell_CellObject ] /; $cloudNotebooks := cell; parentCell[ cell_CellObject ] := ParentCell @ cell; parentCell // endDefinition; @@ -100,7 +100,7 @@ topParentCell // endDefinition; (* ::Subsection::Closed:: *) (*cellPrint*) cellPrint // beginDefinition; -cellPrint[ cell_Cell ] /; CloudSystem`$CloudNotebooks := cloudCellPrint @ cell; +cellPrint[ cell_Cell ] /; $cloudNotebooks := cloudCellPrint @ cell; cellPrint[ cell_Cell ] := MathLink`CallFrontEnd @ FrontEnd`CellPrintReturnObject @ cell; cellPrint // endDefinition; @@ -149,7 +149,7 @@ cellPrintAfter[ a_ ][ b___ ] := throwInternalFailure @ cellPrintAfter[ a ][ b ]; (* ::Subsection::Closed:: *) (*cellOpenQ*) cellOpenQ // beginDefinition; -cellOpenQ[ cell_CellObject ] /; CloudSystem`$CloudNotebooks := Lookup[ Options[ cell, CellOpen ], CellOpen, True ]; +cellOpenQ[ cell_CellObject ] /; $cloudNotebooks := Lookup[ Options[ cell, CellOpen ], CellOpen, True ]; cellOpenQ[ cell_CellObject ] := CurrentValue[ cell, CellOpen ]; cellOpenQ // endDefinition; @@ -157,7 +157,7 @@ cellOpenQ // endDefinition; (* ::Subsection::Closed:: *) (*cellStyles*) cellStyles // beginDefinition; -cellStyles[ cells_ ] /; CloudSystem`$CloudNotebooks := cloudCellStyles @ cells; +cellStyles[ cells_ ] /; $cloudNotebooks := cloudCellStyles @ cells; cellStyles[ cells_ ] := CurrentValue[ cells, CellStyle ]; cellStyles // endDefinition; @@ -176,7 +176,7 @@ cloudCellStyles // endDefinition; (* ::Subsection::Closed:: *) (*parentNotebook*) parentNotebook // beginDefinition; -parentNotebook[ cell_CellObject ] /; CloudSystem`$CloudNotebooks := Notebooks @ cell; +parentNotebook[ cell_CellObject ] /; $cloudNotebooks := Notebooks @ cell; parentNotebook[ cell_CellObject ] := ParentNotebook @ cell; parentNotebook // endDefinition; @@ -184,7 +184,7 @@ parentNotebook // endDefinition; (* ::Subsection::Closed:: *) (*notebookRead*) notebookRead // beginDefinition; -notebookRead[ cells_ ] /; CloudSystem`$CloudNotebooks := cloudNotebookRead @ cells; +notebookRead[ cells_ ] /; $cloudNotebooks := cloudNotebookRead @ cells; notebookRead[ cells_ ] := NotebookRead @ cells; notebookRead // endDefinition; diff --git a/Source/Chatbook/InlineReferences.wl b/Source/Chatbook/InlineReferences.wl index 3a253b23..df0c7730 100644 --- a/Source/Chatbook/InlineReferences.wl +++ b/Source/Chatbook/InlineReferences.wl @@ -44,7 +44,7 @@ $lastInlineReferenceCell = None; (*resolveInlineReferences*) resolveInlineReferences // beginDefinition; -resolveInlineReferences[ _ ] /; CloudSystem`$CloudNotebooks := Null; +resolveInlineReferences[ _ ] /; $cloudNotebooks := Null; resolveInlineReferences[ cell_CellObject ] := ( resolveLastInlineReference[ ]; diff --git a/Source/Chatbook/UI.wl b/Source/Chatbook/UI.wl index fea621d9..78630dfc 100644 --- a/Source/Chatbook/UI.wl +++ b/Source/Chatbook/UI.wl @@ -1298,7 +1298,7 @@ chatHTTPRequest[ (*========================================================*) $dynamicMenuLabel := DynamicModule[ { cell }, - Dynamic @ If[ TrueQ @ CloudSystem`$CloudNotebooks, + Dynamic @ If[ TrueQ @ $cloudNotebooks, RawBoxes @ TemplateBox[{},"ChatInputCellDingbat"], With[{ menuData = GetChatInputLLMConfigurationSelectorMenuData[], From ee606d44c4319e5a66515ef724d138cc7c915fcb Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 10:52:30 -0400 Subject: [PATCH 03/14] Bugfix: don't hardcode chat notebook settings into notebook so it will properly inherit from FE settings --- Source/Chatbook/CreateChatNotebook.wl | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Source/Chatbook/CreateChatNotebook.wl b/Source/Chatbook/CreateChatNotebook.wl index d8ccb2a2..31ca0486 100644 --- a/Source/Chatbook/CreateChatNotebook.wl +++ b/Source/Chatbook/CreateChatNotebook.wl @@ -37,7 +37,7 @@ CreateChatNotebook // Options = { "TopP" -> 1 }; -(* FIXME: don't bake in settings so FE inheritance works *) + CreateChatNotebook[ opts: OptionsPattern[ { CreateChatNotebook, Notebook } ] ] := createChatNotebook @ opts; CreateChatNotebook[ nbo_NotebookObject, opts: OptionsPattern[ { CreateChatNotebook, Notebook } ] ] := @@ -89,7 +89,7 @@ createLocalChatNotebook[ opts: OptionsPattern[ CreateChatNotebook ] ] := NotebookClose @ nbo , SelectionMove[ First @ Cells @ nbo, Before, CellContents ]; - SetOptions[ nbo, Visible -> True ]; + CurrentValue[ nbo, Visible ] = Inherited; SetSelectedNotebook @ nbo ] ] @@ -99,13 +99,7 @@ createLocalChatNotebook[ opts: OptionsPattern[ CreateChatNotebook ] ] := (* ::Subsection::Closed:: *) (*makeChatNotebookSettings*) makeChatNotebookSettings // SetFallthroughError; - -makeChatNotebookSettings[ ] := makeChatNotebookSettings @ <| |>; - -makeChatNotebookSettings[ as_Association? AssociationQ, opts: OptionsPattern[ CreateChatNotebook ] ] := - With[ { bcOpts = Options @ CreateChatNotebook }, - KeyMap[ ToString, Association[ bcOpts, FilterRules[ { opts }, bcOpts ], as ] ] - ]; +makeChatNotebookSettings[ as_Association? AssociationQ ] := KeySort @ KeyMap[ ToString, as ]; (* ::**************************************************************************************************************:: *) (* ::Subsection::Closed:: *) @@ -116,7 +110,10 @@ makeChatNotebookOptions[ settings_Association, opts: OptionsPattern[ ] ] := Sequ Flatten @ { FilterRules[ { opts }, Options @ Notebook ], StyleDefinitions -> $chatbookStylesheet, - TaggingRules -> <| "ChatNotebookSettings" -> settings |> + If[ settings === <| |>, + Nothing, + TaggingRules -> <| "ChatNotebookSettings" -> settings |> + ] }, ToString @* First ]; From 44b5e0d0fa0dfccba4e1ab92cd01546cb220b717 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 10:55:09 -0400 Subject: [PATCH 04/14] Rebuilt stylesheet --- FrontEnd/StyleSheets/Chatbook.nb | 947 ++++++++++++++----------------- 1 file changed, 430 insertions(+), 517 deletions(-) diff --git a/FrontEnd/StyleSheets/Chatbook.nb b/FrontEnd/StyleSheets/Chatbook.nb index 6e9baf41..145c78cd 100644 --- a/FrontEnd/StyleSheets/Chatbook.nb +++ b/FrontEnd/StyleSheets/Chatbook.nb @@ -877,7 +877,7 @@ Notebook[ {Wolfram`Chatbook`UI`Private`cell$$}, DynamicBox[ ToBoxes[ - If[ TrueQ[CloudSystem`$CloudNotebooks], + If[ TrueQ[Wolfram`Chatbook`UI`Private`$cloudNotebooks], RawBoxes[TemplateBox[{}, "ChatInputCellDingbat"]], With[ { @@ -981,7 +981,7 @@ Notebook[ {Wolfram`Chatbook`UI`Private`cell$$}, DynamicBox[ ToBoxes[ - If[ TrueQ[CloudSystem`$CloudNotebooks], + If[ TrueQ[Wolfram`Chatbook`UI`Private`$cloudNotebooks], RawBoxes[TemplateBox[{}, "ChatInputCellDingbat"]], With[ { @@ -1105,7 +1105,7 @@ Notebook[ {Wolfram`Chatbook`UI`Private`cell$$}, DynamicBox[ ToBoxes[ - If[ TrueQ[CloudSystem`$CloudNotebooks], + If[ TrueQ[Wolfram`Chatbook`UI`Private`$cloudNotebooks], RawBoxes[TemplateBox[{}, "ChatInputCellDingbat"]], With[ { @@ -1223,7 +1223,7 @@ Notebook[ CellTrayWidgets -> <|"ChatWidget" -> <|"Visible" -> False|>|>, CellFrameMargins -> {{0, Inherited}, {Inherited, Inherited}}, CounterIncrements -> { }, - Background -> RGBColor[0.98039, 0.98824, 1.0] + Background -> RGBColor[0.98039, 0.98824, 1.] ], Cell[ StyleData[ @@ -1306,7 +1306,7 @@ Notebook[ CellAutoOverwrite -> True, ShowAutoSpellCheck -> False, LineSpacing -> {1.1, 0, 2}, - Background -> RGBColor[0.98824, 0.99216, 1.0] + Background -> RGBColor[0.98824, 0.99216, 1.] ], Cell[ StyleData[ @@ -1542,6 +1542,23 @@ Notebook[ StyleDefinitions -> StyleData["Section"] ], CellFrame -> {{0, 0}, {0, 8}}, + CellDingbat -> + Cell[ + BoxData[ + DynamicBox[ + ToBoxes[ + If[ TrueQ[CloudSystem`$CloudNotebooks], + RawBoxes[TemplateBox[{}, "RoleUser"]], + RawBoxes[TemplateBox[{}, "ChatInputActiveCellDingbat"]] + ], + StandardForm + ] + ] + ], + Background -> None, + CellFrame -> 0, + CellMargins -> 0 + ], CellMargins -> {{66, 25}, {Inherited, Inherited}}, StyleKeyMapping -> {"~" -> "ChatDelimiter", "'" -> "ChatInput"}, CellGroupingRules -> {"SectionGrouping", 30}, @@ -1581,7 +1598,7 @@ Notebook[ ], Cell[ StyleData["ChatDelimiter"], - CellMargins -> {{0, 0}, {10, 10}}, + CellMargins -> {{5, 0}, {10, 10}}, CellElementSpacings -> {"CellMinHeight" -> 6}, CellGroupingRules -> {"SectionGrouping", 62}, CellTrayWidgets -> <|"ChatWidget" -> <|"Visible" -> False|>|>, @@ -1628,7 +1645,22 @@ Notebook[ CellFrameMargins -> {{20, 20}, {2, 2}}, CellFrameLabels -> { { - None, + Cell[ + BoxData[ + DynamicBox[ + ToBoxes[ + If[ TrueQ[CloudSystem`$CloudNotebooks], + RawBoxes[TemplateBox[{}, "RoleUser"]], + RawBoxes[TemplateBox[{}, "ChatInputActiveCellDingbat"]] + ], + StandardForm + ] + ] + ], + Background -> None, + CellFrame -> 0, + CellMargins -> 0 + ], Cell[ BoxData[ TemplateBox[ @@ -1769,14 +1801,14 @@ Notebook[ SpanMaxSize -> 1, StyleMenuListing -> None, FontFamily -> "Source Sans Pro", - FontSize -> 1.0 * Inherited, + FontSize -> 1. * Inherited, ButtonBoxOptions -> {Appearance -> {Automatic, None}}, FractionBoxOptions -> {BaseStyle -> {SpanMaxSize -> Automatic}}, GridBoxOptions -> { GridBoxItemSize -> { "Columns" -> {{Automatic}}, "ColumnsIndexed" -> { }, - "Rows" -> {{1.0}}, + "Rows" -> {{1.}}, "RowsIndexed" -> { } } } @@ -2175,7 +2207,7 @@ Notebook[ Thickness[0.05], { FaceForm[ - {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.0]} + {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.]} ], FilledCurveBox[ { @@ -2207,7 +2239,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.0]} + {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.]} ], FilledCurveBox[ { @@ -2216,33 +2248,15 @@ Notebook[ {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}} }, { - { - {15.0, 14.0}, - {14.0, 14.0}, - {14.0, 6.0}, - {15.0, 6.0}, - {15.0, 14.0} - }, - { - {11.0, 14.0}, - {10.0, 14.0}, - {10.0, 6.0}, - {11.0, 6.0}, - {11.0, 14.0} - }, - { - {7.0, 6.0}, - {6.0, 6.0}, - {6.0, 14.0}, - {7.0, 14.0}, - {7.0, 6.0} - } + {{15., 14.}, {14., 14.}, {14., 6.}, {15., 6.}, {15., 14.}}, + {{11., 14.}, {10., 14.}, {10., 6.}, {11., 6.}, {11., 14.}}, + {{7., 6.}, {6., 6.}, {6., 14.}, {7., 14.}, {7., 6.}} } ] }, { FaceForm[ - {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.0]} + {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.]} ], FilledCurveBox[ { @@ -2251,33 +2265,21 @@ Notebook[ {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}} }, { + {{8., 13.}, {5., 13.}, {5., 12.}, {8., 12.}, {8., 13.}}, + {{12., 8.}, {9., 8.}, {9., 7.}, {12., 7.}, {12., 8.}}, { - {8.0, 13.0}, - {5.0, 13.0}, - {5.0, 12.0}, - {8.0, 12.0}, - {8.0, 13.0} - }, - { - {12.0, 8.0}, - {9.0, 8.0}, - {9.0, 7.0}, - {12.0, 7.0}, - {12.0, 8.0} - }, - { - {16.0, 10.0}, - {13.0, 10.0}, - {13.0, 11.0}, - {16.0, 11.0}, - {16.0, 10.0} + {16., 10.}, + {13., 10.}, + {13., 11.}, + {16., 11.}, + {16., 10.} } } ] } }, AspectRatio -> Automatic, - ImageSize -> {{21.0, 21.0}, {21.0, 21.0}}, + ImageSize -> {{21., 21.}, {21., 21.}}, PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}}, BaselinePosition -> Scaled[0.324] ] @@ -2294,7 +2296,7 @@ Notebook[ Thickness[0.05], { FaceForm[ - {RGBColor[0.69804, 0.69804, 0.69804], Opacity[1.0]} + {RGBColor[0.69804, 0.69804, 0.69804], Opacity[1.]} ], FilledCurveBox[ { @@ -2309,7 +2311,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.2902, 0.58431, 0.8], Opacity[1.0]}], + FaceForm[{RGBColor[0.2902, 0.58431, 0.8], Opacity[1.]}], FilledCurveBox[ { { @@ -2325,28 +2327,22 @@ Notebook[ }, { { - {7.0, 11.0}, - {6.0, 11.0}, - {6.0, 7.0}, - {3.187, 7.0}, - {6.616, 2.0}, - {10.0, 7.0}, - {7.0, 7.0}, - {7.0, 11.0} + {7., 11.}, + {6., 11.}, + {6., 7.}, + {3.187, 7.}, + {6.616, 2.}, + {10., 7.}, + {7., 7.}, + {7., 11.} }, - { - {11.0, 12.0}, - {4.0, 12.0}, - {4.0, 14.0}, - {11.0, 14.0}, - {11.0, 12.0} - } + {{11., 12.}, {4., 12.}, {4., 14.}, {11., 14.}, {11., 12.}} } ] }, { FaceForm[ - {RGBColor[0.63922, 0.78824, 0.94902], Opacity[1.0]} + {RGBColor[0.63922, 0.78824, 0.94902], Opacity[1.]} ], FilledCurveBox[ { @@ -2367,26 +2363,26 @@ Notebook[ }, { { - {2.0, 8.0}, - {5.0, 8.0}, - {5.0, 9.0}, - {3.0, 9.0}, - {3.0, 17.0}, - {14.0, 17.0}, - {14.0, 9.0}, - {8.0, 9.0}, - {8.0, 8.0}, - {15.0, 8.0}, - {15.0, 18.0}, - {2.0, 18.0}, - {2.0, 8.0} + {2., 8.}, + {5., 8.}, + {5., 9.}, + {3., 9.}, + {3., 17.}, + {14., 17.}, + {14., 9.}, + {8., 9.}, + {8., 8.}, + {15., 8.}, + {15., 18.}, + {2., 18.}, + {2., 8.} } } ] }, { FaceForm[ - {RGBColor[0.63137, 0.63137, 0.63137], Opacity[1.0]} + {RGBColor[0.63137, 0.63137, 0.63137], Opacity[1.]} ], FilledCurveBox[ { @@ -2403,22 +2399,22 @@ Notebook[ }, { { - {16.0, 19.0}, - {16.0, 18.0}, - {17.0, 18.0}, - {17.0, 7.9999}, - {16.0, 7.9999}, - {16.0, 6.9999}, - {18.0, 6.9999}, - {18.0, 19.0}, - {16.0, 19.0} + {16., 19.}, + {16., 18.}, + {17., 18.}, + {17., 7.9999}, + {16., 7.9999}, + {16., 6.9999}, + {18., 6.9999}, + {18., 19.}, + {16., 19.} } } ] } }, AspectRatio -> Automatic, - ImageSize -> {{21.0, 21.0}, {21.0, 21.0}}, + ImageSize -> {{21., 21.}, {21., 21.}}, PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}} ] ]) @@ -2434,7 +2430,7 @@ Notebook[ Thickness[0.05], { FaceForm[ - {RGBColor[0.76863, 0.76863, 0.76863], Opacity[1.0]} + {RGBColor[0.76863, 0.76863, 0.76863], Opacity[1.]} ], FilledCurveBox[ { @@ -2449,7 +2445,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.2902, 0.58431, 0.8], Opacity[1.0]}], + FaceForm[{RGBColor[0.2902, 0.58431, 0.8], Opacity[1.]}], FilledCurveBox[ { { @@ -2469,25 +2465,25 @@ Notebook[ }, { { - {16.0, 16.0}, - {16.0, 2.0}, - {4.0, 2.0}, - {4.0, 16.0}, - {6.0, 16.0}, - {6.0, 15.0}, - {5.0, 15.0}, - {5.0, 3.0}, - {15.0, 3.0}, - {15.0, 15.0}, - {14.0, 15.0}, - {14.0, 16.0}, - {16.0, 16.0} + {16., 16.}, + {16., 2.}, + {4., 2.}, + {4., 16.}, + {6., 16.}, + {6., 15.}, + {5., 15.}, + {5., 3.}, + {15., 3.}, + {15., 15.}, + {14., 15.}, + {14., 16.}, + {16., 16.} } } ] }, { - FaceForm[{RGBColor[0.2902, 0.58431, 0.8], Opacity[1.0]}], + FaceForm[{RGBColor[0.2902, 0.58431, 0.8], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -2510,11 +2506,11 @@ Notebook[ }, { { - {8.001, 15.0}, - {11.999, 15.0}, - {11.499, 16.0}, - {8.501, 16.0}, - {8.001, 15.0} + {8.001, 15.}, + {11.999, 15.}, + {11.499, 16.}, + {8.501, 16.}, + {8.001, 15.} }, CompressedData[ "\n1:eJxTTMoPSmViYGCQBmIQPWsmCMg4GIPAZx2HiW9r7E3vSTvU2pvG7erUdTh7\nBgSkHXQ3zX2/3E3Pga1xqnN3jozDvvlS+nefwPhyDvf9e6fnFRk4gM2TlHfY\n9vnvlYqTBg4RlltOlNkpOBz3Nu90ZDB0AKoSamZQdGAAA0MorYSDbwSl1XDw\nDR2eXlC6/fMfgi+tf1eF7aA63L5ls48obCjSgLvnw/Jj3uYnNaDiBhB/ntSE\n+8fjYZXIOnctBz6Qh5/rOoC5DzUd/JIEgF7RcVhSYMt1/bGGwzeNmP5DpjoO\n5SCNczUg/hfScWDSbhe76acBdY+OQ3EGMET/q8P5EP8rwPksYSCb5KDqtB2A\nus99D5Z1OP89+PHSaB0H9PgBAGwLlRk=\n " @@ -2524,7 +2520,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{21.0, 21.0}, {21.0, 21.0}}, + ImageSize -> {{21., 21.}, {21., 21.}}, PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}} ] ]) @@ -2539,7 +2535,7 @@ Notebook[ { Thickness[0.05], { - FaceForm[{RGBColor[0.86667, 0.066667, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.86667, 0.066667, 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -2571,22 +2567,15 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ {{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, - { - { - {8.0, 14.502}, - {8.0, 6.5018}, - {14.0, 10.522}, - {8.0, 14.502} - } - } + {{{8., 14.502}, {8., 6.5018}, {14., 10.522}, {8., 14.502}}} ] } }, AspectRatio -> Automatic, - ImageSize -> {{21.0, 21.0}, {21.0, 21.0}}, + ImageSize -> {{21., 21.}, {21., 21.}}, PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}} ] ]) @@ -2602,7 +2591,7 @@ Notebook[ Thickness[0.04], { FaceForm[ - {RGBColor[0.65098, 0.65098, 0.65098], Opacity[1.0]} + {RGBColor[0.65098, 0.65098, 0.65098], Opacity[1.]} ], FilledCurveBox[ { @@ -2627,7 +2616,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.57255, 0.57255, 0.57255], Opacity[1.0]} + {RGBColor[0.57255, 0.57255, 0.57255], Opacity[1.]} ], FilledCurveBox[ { @@ -2642,19 +2631,19 @@ Notebook[ }, { { - {21.121, 15.0}, - {22.0, 15.0}, + {21.121, 15.}, + {22., 15.}, {19.779, 10.003}, - {22.0, 5.0}, - {21.121, 5.0}, + {22., 5.}, + {21.121, 5.}, {18.42, 9.991}, - {21.121, 15.0} + {21.121, 15.} } } ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -2671,7 +2660,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{26.0, 21.0}, {26.0, 21.0}}, + ImageSize -> {{26., 21.}, {26., 21.}}, PlotRange -> {{-0.5, 25.5}, {0.5, 20.5}} ] ]) @@ -2686,7 +2675,7 @@ Notebook[ { Thickness[0.04], { - FaceForm[{RGBColor[0.0, 0.69804, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[0., 0.69804, 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -2710,7 +2699,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.57255, 0.57255, 0.57255], Opacity[1.0]} + {RGBColor[0.57255, 0.57255, 0.57255], Opacity[1.]} ], FilledCurveBox[ { @@ -2725,19 +2714,19 @@ Notebook[ }, { { - {21.121, 15.0}, - {22.0, 15.0}, + {21.121, 15.}, + {22., 15.}, {19.779, 10.003}, - {22.0, 5.0}, - {21.121, 5.0}, + {22., 5.}, + {21.121, 5.}, {18.42, 9.991}, - {21.121, 15.0} + {21.121, 15.} } } ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -2754,7 +2743,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{26.0, 21.0}, {26.0, 21.0}}, + ImageSize -> {{26., 21.}, {26., 21.}}, PlotRange -> {{-0.5, 25.5}, {0.5, 20.5}} ] ]) @@ -2769,7 +2758,7 @@ Notebook[ { Thickness[0.05], { - FaceForm[{RGBColor[1.0, 0.75686, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 0.75686, 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -2839,7 +2828,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.0, 0.0039216, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0., 0.0039216, 0.], Opacity[1.]}], FilledCurveBox[ {{{0, 2, 0}, {1, 3, 3}, {1, 3, 3}}}, { @@ -2878,7 +2867,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.0, 0.0039216, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0., 0.0039216, 0.], Opacity[1.]}], FilledCurveBox[ {{{0, 2, 0}, {1, 3, 3}, {1, 3, 3}}}, { @@ -2917,7 +2906,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 0.26667, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 0.26667, 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -2992,11 +2981,11 @@ Notebook[ ] }, { - RGBColor[1.0, 1.0, 1.0], + RGBColor[1., 1., 1.], Thickness[0.0075], - Opacity[1.0], + Opacity[1.], CapForm["Round"], - JoinForm[{"Miter", 10.0}], + JoinForm[{"Miter", 10.}], JoinedCurveBox[ {{{0, 2, 0}}}, {{{6.7195, 13.996}, {7.7205, 12.243}}}, @@ -3004,11 +2993,11 @@ Notebook[ ] }, { - RGBColor[1.0, 1.0, 1.0], + RGBColor[1., 1., 1.], Thickness[0.0075], - Opacity[1.0], + Opacity[1.], CapForm["Round"], - JoinForm[{"Miter", 10.0}], + JoinForm[{"Miter", 10.}], JoinedCurveBox[ {{{0, 2, 0}}}, {{{6.0894, 13.996}, {7.0904, 12.243}}}, @@ -3016,11 +3005,11 @@ Notebook[ ] }, { - RGBColor[1.0, 1.0, 1.0], + RGBColor[1., 1., 1.], Thickness[0.0075], - Opacity[1.0], + Opacity[1.], CapForm["Round"], - JoinForm[{"Miter", 10.0}], + JoinForm[{"Miter", 10.}], JoinedCurveBox[ {{{0, 2, 0}}}, {{{11.243, 13.996}, {12.244, 12.243}}}, @@ -3028,11 +3017,11 @@ Notebook[ ] }, { - RGBColor[1.0, 1.0, 1.0], + RGBColor[1., 1., 1.], Thickness[0.0075], - Opacity[1.0], + Opacity[1.], CapForm["Round"], - JoinForm[{"Miter", 10.0}], + JoinForm[{"Miter", 10.}], JoinedCurveBox[ {{{0, 2, 0}}}, {{{10.613, 13.996}, {11.614, 12.243}}}, @@ -3041,8 +3030,8 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}} + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}} ] ]) } @@ -3057,7 +3046,7 @@ Notebook[ Thickness[0.05], { FaceForm[ - {RGBColor[0.65098, 0.65098, 0.65098], Opacity[1.0]} + {RGBColor[0.65098, 0.65098, 0.65098], Opacity[1.]} ], FilledCurveBox[ { @@ -3076,30 +3065,30 @@ Notebook[ }, { { - {3.6555, 6.0}, - {3.0005, 6.0}, - {3.0005, 17.0}, - {14.585, 17.0}, - {15.585, 18.0}, - {3.0005, 18.0}, - {2.4475, 18.0}, + {3.6555, 6.}, + {3.0005, 6.}, + {3.0005, 17.}, + {14.585, 17.}, + {15.585, 18.}, + {3.0005, 18.}, + {2.4475, 18.}, {2.0005, 17.552}, - {2.0005, 17.0}, - {2.0005, 6.0}, + {2.0005, 17.}, + {2.0005, 6.}, {2.0005, 5.448}, - {2.4475, 5.0}, - {3.0005, 5.0}, - {3.6555, 5.0}, + {2.4475, 5.}, + {3.0005, 5.}, + {3.6555, 5.}, {3.4715, 5.312}, {3.4715, 5.688}, - {3.6555, 6.0} + {3.6555, 6.} } } ] }, { FaceForm[ - {RGBColor[0.65098, 0.65098, 0.65098], Opacity[1.0]} + {RGBColor[0.65098, 0.65098, 0.65098], Opacity[1.]} ], FilledCurveBox[ { @@ -3131,7 +3120,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 0.40784, 0.40784], Opacity[1.0]}], + FaceForm[{RGBColor[1., 0.40784, 0.40784], Opacity[1.]}], FilledCurveBox[ { { @@ -3146,8 +3135,8 @@ Notebook[ }, { { - {4.5, 5.0}, - {4.372, 5.0}, + {4.5, 5.}, + {4.372, 5.}, {4.244, 5.049}, {4.146, 5.146}, {3.951, 5.342}, @@ -3162,15 +3151,15 @@ Notebook[ {16.854, 17.146}, {4.854, 5.146}, {4.756, 5.049}, - {4.628, 5.0}, - {4.5, 5.0} + {4.628, 5.}, + {4.5, 5.} } } ] }, { FaceForm[ - {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.0]} + {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.]} ], FilledCurveBox[ { @@ -3192,7 +3181,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.0]} + {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.]} ], FilledCurveBox[ { @@ -3214,7 +3203,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.0]} + {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.]} ], FilledCurveBox[ {{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}}}, @@ -3237,7 +3226,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.0]} + {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.]} ], FilledCurveBox[ {{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}}}, @@ -3260,7 +3249,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{21.0, 21.0}, {21.0, 21.0}}, + ImageSize -> {{21., 21.}, {21., 21.}}, PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}} ] ]) @@ -3275,9 +3264,7 @@ Notebook[ { Thickness[0.038462], { - FaceForm[ - {RGBColor[0.8549, 0.88235, 0.87843], Opacity[1.0]} - ], + FaceForm[{RGBColor[0.8549, 0.88235, 0.87843], Opacity[1.]}], FilledCurveBox[ { { @@ -3301,7 +3288,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.67451, 0.71765, 0.73725], Opacity[1.0]} + {RGBColor[0.67451, 0.71765, 0.73725], Opacity[1.]} ], FilledCurveBox[ { @@ -3349,7 +3336,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{21.0, 21.0}, {21.0, 21.0}}, + ImageSize -> {{21., 21.}, {21., 21.}}, PlotRange -> {{-0.5, 26.5}, {-0.5, 26.5}} ] ]) @@ -3363,7 +3350,7 @@ Notebook[ GraphicsBox[ { Thickness[0.071429], - FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.0]}], + FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -3371,32 +3358,14 @@ Notebook[ {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}} }, { - { - {6.0, 5.0}, - {8.0, 5.0}, - {8.0, 7.0}, - {6.0, 7.0}, - {6.0, 5.0} - }, - { - {6.0, 9.0}, - {8.0, 9.0}, - {8.0, 11.0}, - {6.0, 11.0}, - {6.0, 9.0} - }, - { - {8.0, 13.0}, - {6.0, 13.0}, - {6.0, 15.0}, - {8.0, 15.0}, - {8.0, 13.0} - } + {{6., 5.}, {8., 5.}, {8., 7.}, {6., 7.}, {6., 5.}}, + {{6., 9.}, {8., 9.}, {8., 11.}, {6., 11.}, {6., 9.}}, + {{8., 13.}, {6., 13.}, {6., 15.}, {8., 15.}, {8., 13.}} } ] }, AspectRatio -> Automatic, - ImageSize -> {{15.0, 21.0}, {15.0, 21.0}}, + ImageSize -> {{15., 21.}, {15., 21.}}, PlotRange -> {{-0.5, 14.5}, {-0.5, 20.5}} ] ]) @@ -3416,30 +3385,30 @@ Notebook[ { Thickness[0.083333], { - FaceForm[{RGBColor[0.86667, 0.066667, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.86667, 0.066667, 0.], Opacity[1.]}], FilledCurveBox[ {{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, { { - {4.5, 3.0}, - {6.985, 3.0}, - {9.0, 5.015}, - {9.0, 7.5}, - {9.0, 9.985}, - {6.985, 12.0}, - {4.5, 12.0}, - {2.015, 12.0}, - {0.0, 9.985}, - {0.0, 7.5}, - {0.0, 5.015}, - {2.015, 3.0}, - {4.5, 3.0} + {4.5, 3.}, + {6.985, 3.}, + {9., 5.015}, + {9., 7.5}, + {9., 9.985}, + {6.985, 12.}, + {4.5, 12.}, + {2.015, 12.}, + {0., 9.985}, + {0., 7.5}, + {0., 5.015}, + {2.015, 3.}, + {4.5, 3.} } } ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -3478,7 +3447,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{13.0, 13.0}, {13.0, 13.0}}, + ImageSize -> {{13., 13.}, {13., 13.}}, PlotRange -> {{-0.5, 12.5}, {0.5, 12.5}} ], MouseAppearanceTag["LinkHand"] @@ -3513,7 +3482,7 @@ Notebook[ Thickness[0.04], { FaceForm[ - {RGBColor[0.57255, 0.57255, 0.57255], Opacity[1.0]} + {RGBColor[0.57255, 0.57255, 0.57255], Opacity[1.]} ], FilledCurveBox[ { @@ -3530,17 +3499,17 @@ Notebook[ { {22.58, 9.9913}, {19.879, 5.0003}, - {19.0, 5.0003}, + {19., 5.0003}, {21.221, 10.003}, - {19.0, 15.0}, - {19.879, 15.0}, + {19., 15.}, + {19.879, 15.}, {22.58, 9.9913} } } ] }, { - FaceForm[{RGBColor[0.86667, 0.066667, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.86667, 0.066667, 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -3582,7 +3551,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -3648,55 +3617,25 @@ Notebook[ } }, { + {{14., 9.}, {15., 9.}, {15., 5.}, {14., 5.}, {14., 9.}}, + {{12., 8.}, {13., 8.}, {13., 5.}, {12., 5.}, {12., 8.}}, { - {14.0, 9.0}, - {15.0, 9.0}, - {15.0, 5.0}, - {14.0, 5.0}, - {14.0, 9.0} - }, - { - {12.0, 8.0}, - {13.0, 8.0}, - {13.0, 5.0}, - {12.0, 5.0}, - {12.0, 8.0} - }, - { - {10.0, 12.0}, - {15.0, 12.0}, - {15.0, 11.0}, - {10.0, 11.0}, - {10.0, 12.0} - }, - { - {15.0, 13.0}, - {10.0, 13.0}, - {10.0, 14.0}, - {15.0, 14.0}, - {15.0, 13.0} + {10., 12.}, + {15., 12.}, + {15., 11.}, + {10., 11.}, + {10., 12.} }, { - {3.0, 8.0}, - {9.0, 8.0}, - {9.0, 7.0}, - {3.0, 7.0}, - {3.0, 8.0} - }, - { - {10.0, 7.0}, - {11.0, 7.0}, - {11.0, 5.0}, - {10.0, 5.0}, - {10.0, 7.0} - }, - { - {3.0, 6.0}, - {9.0, 6.0}, - {9.0, 5.0}, - {3.0, 5.0}, - {3.0, 6.0} + {15., 13.}, + {10., 13.}, + {10., 14.}, + {15., 14.}, + {15., 13.} }, + {{3., 8.}, {9., 8.}, {9., 7.}, {3., 7.}, {3., 8.}}, + {{10., 7.}, {11., 7.}, {11., 5.}, {10., 5.}, {10., 7.}}, + {{3., 6.}, {9., 6.}, {9., 5.}, {3., 5.}, {3., 6.}}, { {6.272, 11.831}, {6.128, 11.914}, @@ -3741,7 +3680,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{26.0, 21.0}, {26.0, 21.0}}, + ImageSize -> {{26., 21.}, {26., 21.}}, PlotRange -> {{-0.5, 25.5}, {0.5, 20.5}} ] ]) @@ -3757,7 +3696,7 @@ Notebook[ Thickness[0.04], { FaceForm[ - {RGBColor[0.57255, 0.57255, 0.57255], Opacity[1.0]} + {RGBColor[0.57255, 0.57255, 0.57255], Opacity[1.]} ], FilledCurveBox[ { @@ -3774,10 +3713,10 @@ Notebook[ { {22.58, 9.9913}, {19.879, 5.0003}, - {19.0, 5.0003}, + {19., 5.0003}, {21.221, 10.003}, - {19.0, 15.0}, - {19.879, 15.0}, + {19., 15.}, + {19.879, 15.}, {22.58, 9.9913} } } @@ -3785,7 +3724,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.50196, 0.56078, 0.59216], Opacity[1.0]} + {RGBColor[0.50196, 0.56078, 0.59216], Opacity[1.]} ], FilledCurveBox[ { @@ -3809,7 +3748,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -3911,7 +3850,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, @@ -3924,7 +3863,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{26.0, 21.0}, {26.0, 21.0}}, + ImageSize -> {{26., 21.}, {26., 21.}}, PlotRange -> {{-0.5, 25.5}, {0.5, 20.5}} ] ]) @@ -3940,7 +3879,7 @@ Notebook[ Thickness[0.04], { FaceForm[ - {RGBColor[0.57255, 0.57255, 0.57255], Opacity[1.0]} + {RGBColor[0.57255, 0.57255, 0.57255], Opacity[1.]} ], FilledCurveBox[ { @@ -3957,17 +3896,17 @@ Notebook[ { {22.58, 9.9913}, {19.879, 5.0003}, - {19.0, 5.0003}, + {19., 5.0003}, {21.221, 10.003}, - {19.0, 15.0}, - {19.879, 15.0}, + {19., 15.}, + {19.879, 15.}, {22.58, 9.9913} } } ] }, { - FaceForm[{RGBColor[0.0, 0.51373, 0.83137], Opacity[1.0]}], + FaceForm[{RGBColor[0., 0.51373, 0.83137], Opacity[1.]}], FilledCurveBox[ { { @@ -3990,7 +3929,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -4006,7 +3945,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{26.0, 21.0}, {26.0, 21.0}}, + ImageSize -> {{26., 21.}, {26., 21.}}, PlotRange -> {{-0.5, 25.5}, {0.5, 20.5}} ] ]) @@ -4021,7 +3960,7 @@ Notebook[ { Thickness[0.047619], { - FaceForm[{GrayLevel[1.0], Opacity[1.0]}], + FaceForm[{GrayLevel[1.], Opacity[1.]}], FilledCurveBox[ { { @@ -4044,7 +3983,7 @@ Notebook[ ] }, { - FaceForm[{GrayLevel[0.53725], Opacity[1.0]}], + FaceForm[{GrayLevel[0.53725], Opacity[1.]}], FilledCurveBox[ { { @@ -4092,7 +4031,7 @@ Notebook[ ] }, { - FaceForm[{GrayLevel[0.53725], Opacity[1.0]}], + FaceForm[{GrayLevel[0.53725], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -4168,11 +4107,11 @@ Notebook[ {13.92, 12.324} }, { - {11.0, 15.895}, + {11., 15.895}, {11.595, 14.876}, - {11.0, 14.115}, + {11., 14.115}, {10.404, 14.876}, - {11.0, 15.895} + {11., 15.895} }, { {8.4523, 13.455}, @@ -4225,9 +4164,9 @@ Notebook[ }, { {10.372, 10.693}, - {11.0, 11.545}, + {11., 11.545}, {11.627, 10.693}, - {11.0, 9.7781}, + {11., 9.7781}, {10.372, 10.693} }, { @@ -4302,7 +4241,7 @@ Notebook[ { Thickness[0.05], FaceForm[ - {RGBColor[0.39216, 0.39216, 0.39216], Opacity[1.0]} + {RGBColor[0.39216, 0.39216, 0.39216], Opacity[1.]} ], FilledCurveBox[ { @@ -4329,7 +4268,7 @@ Notebook[ ] }, AspectRatio -> Automatic, - ImageSize -> {{21.0, 21.0}, {21.0, 21.0}}, + ImageSize -> {{21., 21.}, {21., 21.}}, PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}} ] ]) @@ -4349,7 +4288,7 @@ Notebook[ Thickness[0.071429], { FaceForm[ - {RGBColor[0.65098, 0.65098, 0.65098], Opacity[1.0]} + {RGBColor[0.65098, 0.65098, 0.65098], Opacity[1.]} ], FilledCurveBox[ {{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, @@ -4360,12 +4299,12 @@ Notebook[ {9.275, 2.05}, {5.975, 2.05}, {2.675, 2.05}, - {0.0, 4.725}, - {0.0, 8.025}, - {0.0, 11.325}, - {2.675, 14.0}, - {5.975, 14.0}, - {9.275, 14.0}, + {0., 4.725}, + {0., 8.025}, + {0., 11.325}, + {2.675, 14.}, + {5.975, 14.}, + {9.275, 14.}, {11.95, 11.325}, {11.95, 8.025} } @@ -4373,7 +4312,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -4404,7 +4343,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{15.0, 15.0}, {15.0, 15.0}}, + ImageSize -> {{15., 15.}, {15., 15.}}, PlotRange -> {{-0.5, 14.5}, {0.5, 14.5}} ], True -> @@ -4412,7 +4351,7 @@ Notebook[ { Thickness[0.071429], { - FaceForm[{RGBColor[0.94118, 0.44314, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.94118, 0.44314, 0.], Opacity[1.]}], FilledCurveBox[ {{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, { @@ -4422,12 +4361,12 @@ Notebook[ {9.275, 2.05}, {5.975, 2.05}, {2.675, 2.05}, - {0.0, 4.725}, - {0.0, 8.025}, - {0.0, 11.325}, - {2.675, 14.0}, - {5.975, 14.0}, - {9.275, 14.0}, + {0., 4.725}, + {0., 8.025}, + {0., 11.325}, + {2.675, 14.}, + {5.975, 14.}, + {9.275, 14.}, {11.95, 11.325}, {11.95, 8.025} } @@ -4435,7 +4374,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -4466,7 +4405,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{15.0, 15.0}, {15.0, 15.0}}, + ImageSize -> {{15., 15.}, {15., 15.}}, PlotRange -> {{-0.5, 14.5}, {0.5, 14.5}} ] }, @@ -4488,7 +4427,7 @@ Notebook[ { Thickness[0.05], { - FaceForm[{RGBColor[0.0, 0.52157, 0.8549], Opacity[1.0]}], + FaceForm[{RGBColor[0., 0.52157, 0.8549], Opacity[1.]}], FilledCurveBox[ { { @@ -4555,7 +4494,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, @@ -4654,8 +4593,8 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}} + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}} ] ]) } @@ -4668,7 +4607,7 @@ Notebook[ GraphicsBox[ { Thickness[0.071429], - FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.0]}], + FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}], FilledCurveBox[ { {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}, @@ -4722,7 +4661,7 @@ Notebook[ }, AspectRatio -> Automatic, BaselinePosition -> Scaled[0.2], - ImageSize -> {{15.0, 16.0}, {15.0, 16.0}}, + ImageSize -> {{15., 16.}, {15., 16.}}, PlotRange -> {{-0.5, 14.5}, {-0.5, 15.5}} ] ]) @@ -4736,7 +4675,7 @@ Notebook[ GraphicsBox[ { Thickness[0.11111], - FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.0]}], + FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -4787,7 +4726,7 @@ Notebook[ }, AspectRatio -> Automatic, BaselinePosition -> Scaled[0.18], - ImageSize -> {{10.0, 16.0}, {10.0, 16.0}}, + ImageSize -> {{10., 16.}, {10., 16.}}, PlotRange -> {{-0.5, 9.5}, {-0.5, 15.5}} ] ]) @@ -4801,7 +4740,7 @@ Notebook[ GraphicsBox[ { Thickness[0.1], - FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.0]}], + FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}], FilledCurveBox[ { { @@ -4825,30 +4764,30 @@ Notebook[ }, { { - {9.0, 8.6022}, + {9., 8.6022}, {8.398, 7.8492}, - {5.0, 10.387}, + {5., 10.387}, {1.645, 7.8492}, - {1.0, 8.6022}, + {1., 8.6022}, {4.333, 11.548}, {5.667, 11.548}, - {9.0, 8.6022} + {9., 8.6022} }, { - {9.0, 5.2042}, + {9., 5.2042}, {8.398, 4.4512}, - {5.0, 6.9892}, + {5., 6.9892}, {1.645, 4.4512}, - {1.0, 5.2042}, + {1., 5.2042}, {4.333, 8.1502}, {5.667, 8.1502}, - {9.0, 5.2042} + {9., 5.2042} } } ] }, AspectRatio -> Automatic, - ImageSize -> {{11.0, 16.0}, {11.0, 16.0}}, + ImageSize -> {{11., 16.}, {11., 16.}}, PlotRange -> {{-0.5, 10.5}, {-0.5, 15.5}} ] ]) @@ -4862,7 +4801,7 @@ Notebook[ GraphicsBox[ { Thickness[0.1], - FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.0]}], + FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}], FilledCurveBox[ { { @@ -4877,20 +4816,20 @@ Notebook[ }, { { - {9.0, 6.4578}, + {9., 6.4578}, {8.398, 5.7048}, - {5.0, 8.2428}, + {5., 8.2428}, {1.645, 5.7048}, - {1.0, 6.4578}, + {1., 6.4578}, {4.333, 9.4038}, {5.667, 9.4038}, - {9.0, 6.4578} + {9., 6.4578} } } ] }, AspectRatio -> Automatic, - ImageSize -> {{11.0, 16.0}, {11.0, 16.0}}, + ImageSize -> {{11., 16.}, {11., 16.}}, PlotRange -> {{-0.5, 10.5}, {-0.5, 15.5}} ] ]) @@ -4904,7 +4843,7 @@ Notebook[ GraphicsBox[ { Thickness[0.1], - FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.0]}], + FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}], FilledCurveBox[ { { @@ -4932,7 +4871,7 @@ Notebook[ ] }, AspectRatio -> Automatic, - ImageSize -> {{11.0, 16.0}, {11.0, 16.0}}, + ImageSize -> {{11., 16.}, {11., 16.}}, PlotRange -> {{-0.5, 10.5}, {-0.5, 15.5}} ] ]) @@ -4947,7 +4886,7 @@ Notebook[ { Thickness[0.047619], { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -4971,7 +4910,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.0]} + {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.]} ], FilledCurveBox[ { @@ -5053,7 +4992,7 @@ Notebook[ { Thickness[0.047619], { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -5077,7 +5016,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.0]} + {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.]} ], FilledCurveBox[ { @@ -5126,7 +5065,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.86667, 0.066667, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.86667, 0.066667, 0.], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -5202,11 +5141,11 @@ Notebook[ {13.92, 12.324} }, { - {11.0, 15.895}, + {11., 15.895}, {11.595, 14.876}, - {11.0, 14.115}, + {11., 14.115}, {10.404, 14.876}, - {11.0, 15.895} + {11., 15.895} }, { {8.4523, 13.455}, @@ -5259,9 +5198,9 @@ Notebook[ }, { {10.372, 10.693}, - {11.0, 11.545}, + {11., 11.545}, {11.627, 10.693}, - {11.0, 9.7781}, + {11., 9.7781}, {10.372, 10.693} }, { @@ -5337,7 +5276,7 @@ Notebook[ Thickness[0.05], { FaceForm[ - {RGBColor[0.37255, 0.65098, 0.58431], Opacity[1.0]} + {RGBColor[0.37255, 0.65098, 0.58431], Opacity[1.]} ], FilledCurveBox[ { @@ -5484,7 +5423,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.0]}], + FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}], FilledCurveBox[ { { @@ -5498,27 +5437,27 @@ Notebook[ }, { { - {15.5, 1.0}, - {9.4999, 1.0}, - {7.5669, 1.0}, + {15.5, 1.}, + {9.4999, 1.}, + {7.5669, 1.}, {5.9999, 2.567}, {5.9999, 4.5}, {5.9999, 6.433}, - {7.5669, 8.0}, - {9.4999, 8.0}, - {15.5, 8.0}, - {17.433, 8.0}, - {19.0, 6.433}, - {19.0, 4.5}, - {19.0, 2.567}, - {17.433, 1.0}, - {15.5, 1.0} + {7.5669, 8.}, + {9.4999, 8.}, + {15.5, 8.}, + {17.433, 8.}, + {19., 6.433}, + {19., 4.5}, + {19., 2.567}, + {17.433, 1.}, + {15.5, 1.} } } ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -5616,8 +5555,8 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}} + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}} ] ]) } @@ -5632,7 +5571,7 @@ Notebook[ Thickness[0.05], { FaceForm[ - {RGBColor[0.37255, 0.65098, 0.58431], Opacity[1.0]} + {RGBColor[0.37255, 0.65098, 0.58431], Opacity[1.]} ], FilledCurveBox[ { @@ -5779,31 +5718,31 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.0]}], + FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}], FilledCurveBox[ {{{0, 2, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, { { - {15.5, 1.0}, - {15.5, 1.0}, - {13.567, 1.0}, - {12.0, 2.567}, - {12.0, 4.5}, - {12.0, 6.433}, - {13.567, 8.0}, - {15.5, 8.0}, - {17.433, 8.0}, - {19.0, 6.433}, - {19.0, 4.5}, - {19.0, 2.567}, - {17.433, 1.0}, - {15.5, 1.0} + {15.5, 1.}, + {15.5, 1.}, + {13.567, 1.}, + {12., 2.567}, + {12., 4.5}, + {12., 6.433}, + {13.567, 8.}, + {15.5, 8.}, + {17.433, 8.}, + {19., 6.433}, + {19., 4.5}, + {19., 2.567}, + {17.433, 1.}, + {15.5, 1.} } } ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -5848,8 +5787,8 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}} + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}} ] ]) } @@ -5863,8 +5802,8 @@ Notebook[ GeometricTransformationBox[ { RGBColor[0.4549, 0.66667, 0.61176], - Thickness[0.0], - Opacity[1.0], + Thickness[0.], + Opacity[1.], FilledCurveBox[ { { @@ -6030,7 +5969,7 @@ Notebook[ { Thickness[0.05], { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ {{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, { @@ -6038,13 +5977,13 @@ Notebook[ {9.9999, 1.75}, {5.4509, 1.75}, {1.7499, 5.451}, - {1.7499, 10.0}, + {1.7499, 10.}, {1.7499, 14.549}, {5.4509, 18.25}, {9.9999, 18.25}, {14.549, 18.25}, {18.25, 14.549}, - {18.25, 10.0}, + {18.25, 10.}, {18.25, 5.451}, {14.549, 1.75}, {9.9999, 1.75} @@ -6065,7 +6004,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.96863, 0.0, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.96863, 0., 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -6098,7 +6037,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.96863, 0.0, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.96863, 0., 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -6163,7 +6102,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.96863, 0.0, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.96863, 0., 0.], Opacity[1.]}], FilledCurveBox[ {{{1, 4, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, { @@ -6188,8 +6127,8 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}} + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}} ] ]) } @@ -6203,7 +6142,7 @@ Notebook[ { Thickness[0.05], { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -6219,14 +6158,14 @@ Notebook[ { {3.7499, 1.75}, {3.7499, 18.25}, - {15.0, 18.25}, + {15., 18.25}, {15.689, 18.25}, {16.25, 17.689}, - {16.25, 17.0}, - {16.25, 3.0}, + {16.25, 17.}, + {16.25, 3.}, {16.25, 2.311}, {15.689, 1.75}, - {15.0, 1.75}, + {15., 1.75}, {3.7499, 1.75} } } @@ -6259,40 +6198,40 @@ Notebook[ }, { { - {15.0, 18.5}, + {15., 18.5}, {3.9999, 18.5}, {3.4999, 18.5}, - {3.4999, 18.0}, - {3.4999, 2.0}, + {3.4999, 18.}, + {3.4999, 2.}, {3.4999, 1.5}, {3.9999, 1.5}, - {15.0, 1.5}, + {15., 1.5}, {15.827, 1.5}, {16.5, 2.173}, - {16.5, 3.0}, - {16.5, 17.0}, + {16.5, 3.}, + {16.5, 17.}, {16.5, 17.827}, {15.827, 18.5}, - {15.0, 18.5} - }, - { - {15.0, 18.0}, - {15.552, 18.0}, - {16.0, 17.552}, - {16.0, 17.0}, - {16.0, 3.0}, - {16.0, 2.448}, - {15.552, 2.0}, - {15.0, 2.0}, - {3.9999, 2.0}, - {3.9999, 18.0}, - {15.0, 18.0} + {15., 18.5} + }, + { + {15., 18.}, + {15.552, 18.}, + {16., 17.552}, + {16., 17.}, + {16., 3.}, + {16., 2.448}, + {15.552, 2.}, + {15., 2.}, + {3.9999, 2.}, + {3.9999, 18.}, + {15., 18.} } } ] }, { - FaceForm[{RGBColor[1.0, 0.4549, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 0.4549, 0.], Opacity[1.]}], FilledCurveBox[ {{{0, 2, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, { @@ -6313,7 +6252,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 0.4549, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 0.4549, 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -6379,7 +6318,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 0.4549, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 0.4549, 0.], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -6412,20 +6351,8 @@ Notebook[ } }, { - { - {14.0, 15.0}, - {6.0, 15.0}, - {6.0, 16.0}, - {14.0, 16.0}, - {14.0, 15.0} - }, - { - {14.0, 13.0}, - {6.0, 13.0}, - {6.0, 14.0}, - {14.0, 14.0}, - {14.0, 13.0} - }, + {{14., 15.}, {6., 15.}, {6., 16.}, {14., 16.}, {14., 15.}}, + {{14., 13.}, {6., 13.}, {6., 14.}, {14., 14.}, {14., 13.}}, CompressedData[ "\n1:eJxTTMoPSmViYGDQB2IQDQF6DhDaCEoLYPDPfw9+vHQ2vwOTdrvYTT9Bhy0n\nyvbNlxJ2AAoeUdgg7ODFA5SZJumQBgZiDvp3VdgaRRUcSidLsITxSTncPAc0\nQFXJYQ5QddELaYeXaoYca+6oOATtkGt9HSjn8OmSb5LADTWHcqCp+nMVHLiu\nLy6w5dJwAFPiig7r3B9WieRpOPwAOcNF0SHF+r5/73V1B6BmoAmKDh+WH/M2\n51R3OHhqoeu2zYoOp4HU51o1hz8rP17yfaToYAwCn1Uh6lmVHKLABqg6fPl7\npeKlmpIDn+6mue/VVR1kwRJKDpox/Ye+rlBxEAFZfEXJwce80zFBVRXibhll\nB8UNRRkTc1UdjiqAGMoOQNmnFx6pOqwAOqOzEaZPzSFJIMJyywkViD3L1Bwy\nJr6tsTdVhbgrSc0BJFtmpwpxd7GiQ3fO898rDVUdbMEBoOBgDjZYzQEUvGKR\nsg57SoABKqbtAHL99HfiDiHgCNB2AIYO0EZxh97peULNDdoO2z4DLcwUh5qv\n7SAJjAXdTWIQ/dM0oeEg5ADy9nI3TQeh5gOnFh4VdKgEeVBH0+EfKFg2Cjqo\ng7x7S8MBREWlCELc91Hd4ekFpds/6wQdQL5/a6MO8f8iQah5qg4g5+UJCUHC\nk18Tmo4YHFDTGwM0HemjyRtA0s9UZjgfQnOg8Q3hfEh8GqKZB0u/iPQNAHoY\nB8o=\n " ] @@ -6434,8 +6361,8 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}} + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}} ] ]) } @@ -6449,30 +6376,30 @@ Notebook[ { Thickness[0.05], { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ {{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, { { - {16.749, 10.0}, + {16.749, 10.}, {16.749, 6.272}, {13.716, 3.25}, {9.975, 3.25}, {6.234, 3.25}, {3.201, 6.272}, - {3.201, 10.0}, + {3.201, 10.}, {3.201, 13.728}, {6.234, 16.75}, {9.975, 16.75}, {13.716, 16.75}, {16.749, 13.728}, - {16.749, 10.0} + {16.749, 10.} } } ] }, { - FaceForm[{RGBColor[0.8, 0.8, 0.8], Opacity[1.0]}], + FaceForm[{RGBColor[0.8, 0.8, 0.8], Opacity[1.]}], FilledCurveBox[ { { @@ -7021,7 +6948,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.43137, 0.43137, 0.43137], Opacity[1.0]} + {RGBColor[0.43137, 0.43137, 0.43137], Opacity[1.]} ], FilledCurveBox[ { @@ -7348,8 +7275,8 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}}, + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}}, BaselinePosition -> Scaled[0.282] ] ]) @@ -7384,7 +7311,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -7491,7 +7418,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, @@ -7543,8 +7470,8 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}}, + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}}, BaselinePosition -> Scaled[0.262] ] ]) @@ -7580,7 +7507,7 @@ Notebook[ ] ] }, - {FaceForm[RGBColor[0.7451, 0.82353, 1.0, 1.0]]}, + {FaceForm[RGBColor[0.7451, 0.82353, 1., 1.]]}, StripOnInput -> False ], StyleBox[ @@ -7656,11 +7583,11 @@ Notebook[ } ] }, - {FaceForm[RGBColor[0.42353, 0.48627, 0.68627, 1.0]]}, + {FaceForm[RGBColor[0.42353, 0.48627, 0.68627, 1.]]}, StripOnInput -> False ] }, - ImageSize -> {{20.0, 20.0}, {20.0, 20.0}}, + ImageSize -> {{20., 20.}, {20., 20.}}, PlotRange -> {{-0.5, 26.5}, {-0.5, 26.5}}, AspectRatio -> Automatic ] @@ -7677,7 +7604,7 @@ Notebook[ Thickness[0.05], { FaceForm[ - {RGBColor[0.48627, 0.56078, 0.59216], Opacity[1.0]} + {RGBColor[0.48627, 0.56078, 0.59216], Opacity[1.]} ], FilledCurveBox[ { @@ -7701,7 +7628,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -7803,7 +7730,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ { {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, @@ -7816,8 +7743,8 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}} + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}} ] ]) } @@ -7831,7 +7758,7 @@ Notebook[ { Thickness[0.038462], { - FaceForm[{RGBColor[0.4902, 0.82353, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.4902, 0.82353, 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -7854,9 +7781,7 @@ Notebook[ ] }, { - FaceForm[ - {RGBColor[0.18824, 0.49412, 0.6549], Opacity[1.0]} - ], + FaceForm[{RGBColor[0.18824, 0.49412, 0.6549], Opacity[1.]}], FilledCurveBox[ { { @@ -7903,7 +7828,7 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {{20.0, 20.0}, {20.0, 20.0}}, + ImageSize -> {{20., 20.}, {20., 20.}}, PlotRange -> {{-0.5, 26.5}, {-0.5, 26.5}} ] ]) @@ -7917,7 +7842,7 @@ Notebook[ GraphicsBox[ { Thickness[0.05], - FaceForm[{RGBColor[0.0, 0.52157, 0.8549], Opacity[1.0]}], + FaceForm[{RGBColor[0., 0.52157, 0.8549], Opacity[1.]}], FilledCurveBox[ { { @@ -7940,8 +7865,8 @@ Notebook[ ] }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}} + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}} ] ]) } @@ -7955,7 +7880,7 @@ Notebook[ { Thickness[0.05], { - FaceForm[{RGBColor[0.4902, 0.82353, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.4902, 0.82353, 1.], Opacity[1.]}], FilledCurveBox[ { { @@ -7978,9 +7903,7 @@ Notebook[ ] }, { - FaceForm[ - {RGBColor[0.18824, 0.49412, 0.6549], Opacity[1.0]} - ], + FaceForm[{RGBColor[0.18824, 0.49412, 0.6549], Opacity[1.]}], FilledCurveBox[ { { @@ -8021,7 +7944,7 @@ Notebook[ {9.8486, 5.5}, {9.7226, 5.416}, {7.4996, 3.934}, - {7.4996, 5.0}, + {7.4996, 5.}, {7.4996, 5.5}, {6.9996, 5.5}, {5.4996, 5.5}, @@ -8033,24 +7956,16 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.33725, 0.65882, 0.82745], Opacity[1.0]} + {RGBColor[0.33725, 0.65882, 0.82745], Opacity[1.]} ], FilledCurveBox[ {{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, - { - { - {3.0, 15.0}, - {17.0, 15.0}, - {17.0, 17.0}, - {3.0, 17.0}, - {3.0, 15.0} - } - } + {{{3., 15.}, {17., 15.}, {17., 17.}, {3., 17.}, {3., 15.}}} ] } }, AspectRatio -> Automatic, - ImageSize -> {{21.0, 21.0}, {21.0, 21.0}}, + ImageSize -> {{21., 21.}, {21., 21.}}, PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}} ] ]) @@ -8065,7 +7980,7 @@ Notebook[ { Thickness[0.11111], FaceForm[ - {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.0]} + {RGBColor[0.53725, 0.53725, 0.53725], Opacity[1.]} ], FilledCurveBox[ { @@ -8098,7 +8013,7 @@ Notebook[ ] }, AspectRatio -> Automatic, - ImageSize -> {{10.0, 12.0}, {10.0, 12.0}}, + ImageSize -> {{10., 12.}, {10., 12.}}, PlotRange -> {{-0.5, 9.5}, {-0.5, 11.5}} ] ]) @@ -8295,7 +8210,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.62745, 0.58039, 0.58039], Opacity[1.0]} + {RGBColor[0.62745, 0.58039, 0.58039], Opacity[1.]} ], FilledCurveBox[ { @@ -8314,9 +8229,7 @@ Notebook[ ] }, { - FaceForm[ - {RGBColor[0.7451, 0.69804, 0.69804], Opacity[1.0]} - ], + FaceForm[{RGBColor[0.7451, 0.69804, 0.69804], Opacity[1.]}], FilledCurveBox[ { { @@ -8339,7 +8252,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.95686, 0.0, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.95686, 0., 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -8359,7 +8272,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.76078, 0.0, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.76078, 0., 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -8394,7 +8307,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.97647, 0.16078, 0.13725], Opacity[1.0]} + {RGBColor[0.97647, 0.16078, 0.13725], Opacity[1.]} ], FilledCurveBox[ {{{0, 2, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, @@ -8419,7 +8332,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.96863, 0.0, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.96863, 0., 0.], Opacity[1.]}], FilledCurveBox[ {{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}}, { @@ -8438,7 +8351,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.79216, 0.019608, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.79216, 0.019608, 0.], Opacity[1.]}], FilledCurveBox[ {{{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, { @@ -8456,7 +8369,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.81961, 0.19216, 0.16078], Opacity[1.0]} + {RGBColor[0.81961, 0.19216, 0.16078], Opacity[1.]} ], FilledCurveBox[ { @@ -8499,7 +8412,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.95686, 0.0, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.95686, 0., 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -8519,7 +8432,7 @@ Notebook[ }, { FaceForm[ - {RGBColor[0.62745, 0.58039, 0.58039], Opacity[1.0]} + {RGBColor[0.62745, 0.58039, 0.58039], Opacity[1.]} ], FilledCurveBox[ { @@ -8642,7 +8555,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.95686, 0.0, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.95686, 0., 0.], Opacity[1.]}], FilledCurveBox[ { { @@ -8664,7 +8577,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[1.0, 1.0, 1.0], Opacity[1.0]}], + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], FilledCurveBox[ {{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, { @@ -8687,7 +8600,7 @@ Notebook[ ] }, { - FaceForm[{RGBColor[0.95686, 0.0, 0.0], Opacity[1.0]}], + FaceForm[{RGBColor[0.95686, 0., 0.], Opacity[1.]}], FilledCurveBox[ { {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, @@ -8882,8 +8795,8 @@ Notebook[ } }, AspectRatio -> Automatic, - ImageSize -> {20.0, 20.0}, - PlotRange -> {{0.0, 20.0}, {0.0, 20.0}} + ImageSize -> {20., 20.}, + PlotRange -> {{0., 20.}, {0., 20.}} ] ]) } From 9b5d8e5fd247002be9780a92ff8ef6cda6f42d41 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 13:14:17 -0400 Subject: [PATCH 05/14] Properly inherit settings from chat block delimiters --- Source/Chatbook/FrontEnd.wl | 86 +++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 4 deletions(-) diff --git a/Source/Chatbook/FrontEnd.wl b/Source/Chatbook/FrontEnd.wl index 096905a8..34f73a64 100644 --- a/Source/Chatbook/FrontEnd.wl +++ b/Source/Chatbook/FrontEnd.wl @@ -31,20 +31,98 @@ Needs[ "Wolfram`Chatbook`Common`" ]; (*currentChatSettings*) currentChatSettings // beginDefinition; -currentChatSettings[ obj: _NotebookObject|_CellObject ] := +currentChatSettings[ nbo_NotebookObject ] := Association[ $defaultChatSettings, Replace[ - Association @ CurrentValue[ obj, { TaggingRules, "ChatNotebookSettings" } ], + Association @ CurrentValue[ nbo, { TaggingRules, "ChatNotebookSettings" } ], Except[ _? AssociationQ ] :> <| |> ] ]; -currentChatSettings[ obj: _NotebookObject|_CellObject, key_String ] := Replace[ - AbsoluteCurrentValue[ obj, { TaggingRules, "ChatNotebookSettings", key } ], +currentChatSettings[ nbo_NotebookObject, key_String ] := Replace[ + AbsoluteCurrentValue[ nbo, { TaggingRules, "ChatNotebookSettings", key } ], Inherited :> Lookup[ $defaultChatSettings, key, Inherited ] ]; + +currentChatSettings[ cell_CellObject ] := Enclose[ + Module[ { nbo, cells, before, info, delimiter, settings }, + + nbo = ConfirmMatch[ parentNotebook @ cell, _NotebookObject, "ParentNotebook" ]; + + cells = ConfirmMatch[ + Cells[ nbo, CellStyle -> Union[ $chatDelimiterStyles, $chatInputStyles ] ], + { __CellObject }, + "ChatCells" + ]; + + before = ConfirmMatch[ + Replace[ cells, { { a___, cell, ___ } :> { a }, ___ :> $Failed } ], + { ___CellObject }, + "BeforeCells" + ]; + + info = ConfirmMatch[ + cellInformation @ before, + { KeyValuePattern[ "CellObject" -> _CellObject ]... }, + "CellInformation" + ]; + + delimiter = FirstCase[ + Reverse @ info, + KeyValuePattern @ { "Style" -> $$chatDelimiterStyle, "CellObject" -> c_ } :> c, + Nothing + ]; + + settings = Select[ + Map[ Association, + CurrentValue[ DeleteMissing @ { delimiter, cell }, { TaggingRules, "ChatNotebookSettings" } ] + ], + AssociationQ + ]; + + ConfirmBy[ Association[ $defaultChatSettings, settings ], AssociationQ, "CombinedSettings" ] + ], + throwInternalFailure[ currentChatSettings @ cell, ## ] & +]; + +currentChatSettings[ cell_CellObject, key_String ] := Enclose[ + Module[ { nbo, cells, before, info, delimiter, values }, + + nbo = ConfirmMatch[ parentNotebook @ cell, _NotebookObject, "ParentNotebook" ]; + + cells = ConfirmMatch[ + Cells[ nbo, CellStyle -> Union[ $chatDelimiterStyles, $chatInputStyles ] ], + { __CellObject }, + "ChatCells" + ]; + + before = ConfirmMatch[ + Replace[ cells, { { a___, cell, ___ } :> { a }, ___ :> $Failed } ], + { ___CellObject }, + "BeforeCells" + ]; + + info = ConfirmMatch[ + cellInformation @ before, + { KeyValuePattern[ "CellObject" -> _CellObject ]... }, + "CellInformation" + ]; + + delimiter = FirstCase[ + Reverse @ info, + KeyValuePattern @ { "Style" -> $$chatDelimiterStyle, "CellObject" -> c_ } :> c, + Nothing + ]; + + values = CurrentValue[ DeleteMissing @ { delimiter, cell }, { TaggingRules, "ChatNotebookSettings", key } ]; + + FirstCase[ values, Except[ Inherited ], Lookup[ $defaultChatSettings, key, Inherited ] ] + ], + throwInternalFailure[ currentChatSettings[ cell, key ], ## ] & +]; + currentChatSettings // endDefinition; (* ::**************************************************************************************************************:: *) From bb3c5c834c61db8334ddc1fd74c640fbea3f3a22 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 13:23:38 -0400 Subject: [PATCH 06/14] Bugfix: evaluation cell isn't always a chat input --- Source/Chatbook/FrontEnd.wl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Chatbook/FrontEnd.wl b/Source/Chatbook/FrontEnd.wl index 34f73a64..8365a348 100644 --- a/Source/Chatbook/FrontEnd.wl +++ b/Source/Chatbook/FrontEnd.wl @@ -52,7 +52,7 @@ currentChatSettings[ cell_CellObject ] := Enclose[ nbo = ConfirmMatch[ parentNotebook @ cell, _NotebookObject, "ParentNotebook" ]; cells = ConfirmMatch[ - Cells[ nbo, CellStyle -> Union[ $chatDelimiterStyles, $chatInputStyles ] ], + Cells[ nbo, CellStyle -> Union[ $chatDelimiterStyles, cellStyles @ cell ] ], { __CellObject }, "ChatCells" ]; @@ -93,7 +93,7 @@ currentChatSettings[ cell_CellObject, key_String ] := Enclose[ nbo = ConfirmMatch[ parentNotebook @ cell, _NotebookObject, "ParentNotebook" ]; cells = ConfirmMatch[ - Cells[ nbo, CellStyle -> Union[ $chatDelimiterStyles, $chatInputStyles ] ], + Cells[ nbo, CellStyle -> Union[ $chatDelimiterStyles, cellStyles @ cell ] ], { __CellObject }, "ChatCells" ]; From 4675fe5f77b16dbb7aadc72df8313a1d1b1e6776 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 13:24:01 -0400 Subject: [PATCH 07/14] Bugfix: initialize temperature slider based on `currentChatSettings` --- Source/Chatbook/UI.wl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Chatbook/UI.wl b/Source/Chatbook/UI.wl index 78630dfc..b2fa09e7 100644 --- a/Source/Chatbook/UI.wl +++ b/Source/Chatbook/UI.wl @@ -1442,7 +1442,7 @@ openChatInputActionMenu[dingbatCellObj_CellObject] := With[{ (* "ChatInput" > CellDingbat > Persona Menu > Advanced Menu *) chatInputCellObj, { TaggingRules, "ChatNotebookSettings", "TemperatureSetting" }, - 0.7 + currentChatSettings[ chatInputCellObj, "Temperature" ] ], Function[ CurrentValue[ chatInputCellObj, { TaggingRules, "ChatNotebookSettings", "TemperatureSetting" } ] = From 111bb8609fb48e2c32819012faa300ff7f170a64 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 13:31:53 -0400 Subject: [PATCH 08/14] Bugfix: chat delimiter cells should not inherit from other delimiters --- Source/Chatbook/FrontEnd.wl | 52 ++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/Source/Chatbook/FrontEnd.wl b/Source/Chatbook/FrontEnd.wl index 8365a348..28c06d78 100644 --- a/Source/Chatbook/FrontEnd.wl +++ b/Source/Chatbook/FrontEnd.wl @@ -31,28 +31,21 @@ Needs[ "Wolfram`Chatbook`Common`" ]; (*currentChatSettings*) currentChatSettings // beginDefinition; -currentChatSettings[ nbo_NotebookObject ] := - Association[ - $defaultChatSettings, - Replace[ - Association @ CurrentValue[ nbo, { TaggingRules, "ChatNotebookSettings" } ], - Except[ _? AssociationQ ] :> <| |> - ] - ]; +currentChatSettings[ nbo_NotebookObject ] := currentChatSettings0 @ nbo; +currentChatSettings[ nbo_NotebookObject, key_String ] := currentChatSettings0[ nbo, key ]; -currentChatSettings[ nbo_NotebookObject, key_String ] := Replace[ - AbsoluteCurrentValue[ nbo, { TaggingRules, "ChatNotebookSettings", key } ], - Inherited :> Lookup[ $defaultChatSettings, key, Inherited ] -]; +currentChatSettings[ cell_CellObject ] := Catch @ Enclose[ + Module[ { styles, nbo, cells, before, info, delimiter, settings }, + + styles = cellStyles @ cell; -currentChatSettings[ cell_CellObject ] := Enclose[ - Module[ { nbo, cells, before, info, delimiter, settings }, + If[ MemberQ[ styles, $$chatDelimiterStyle ], Throw @ currentChatSettings0 @ cell ]; nbo = ConfirmMatch[ parentNotebook @ cell, _NotebookObject, "ParentNotebook" ]; cells = ConfirmMatch[ - Cells[ nbo, CellStyle -> Union[ $chatDelimiterStyles, cellStyles @ cell ] ], + Cells[ nbo, CellStyle -> Union[ $chatDelimiterStyles, styles ] ], { __CellObject }, "ChatCells" ]; @@ -87,13 +80,17 @@ currentChatSettings[ cell_CellObject ] := Enclose[ throwInternalFailure[ currentChatSettings @ cell, ## ] & ]; -currentChatSettings[ cell_CellObject, key_String ] := Enclose[ - Module[ { nbo, cells, before, info, delimiter, values }, +currentChatSettings[ cell_CellObject, key_String ] := Catch @ Enclose[ + Module[ { styles, nbo, cells, before, info, delimiter, values }, + + styles = cellStyles @ cell; + + If[ MemberQ[ styles, $$chatDelimiterStyle ], Throw @ currentChatSettings0[ cell, key ] ]; nbo = ConfirmMatch[ parentNotebook @ cell, _NotebookObject, "ParentNotebook" ]; cells = ConfirmMatch[ - Cells[ nbo, CellStyle -> Union[ $chatDelimiterStyles, cellStyles @ cell ] ], + Cells[ nbo, CellStyle -> Union[ $chatDelimiterStyles, styles ] ], { __CellObject }, "ChatCells" ]; @@ -125,6 +122,25 @@ currentChatSettings[ cell_CellObject, key_String ] := Enclose[ currentChatSettings // endDefinition; + +currentChatSettings0 // beginDefinition; + +currentChatSettings0[ obj: _CellObject|_NotebookObject ] := + Association[ + $defaultChatSettings, + Replace[ + Association @ CurrentValue[ obj, { TaggingRules, "ChatNotebookSettings" } ], + Except[ _? AssociationQ ] :> <| |> + ] + ]; + +currentChatSettings0[ obj: _CellObject|_NotebookObject, key_String ] := Replace[ + AbsoluteCurrentValue[ obj, { TaggingRules, "ChatNotebookSettings", key } ], + Inherited :> Lookup[ $defaultChatSettings, key, Inherited ] +]; + +currentChatSettings0 // endDefinition; + (* ::**************************************************************************************************************:: *) (* ::Subsubsection::Closed:: *) (*$defaultChatSettings*) From 0923d5b51c59f0139d38116bdfde67755724a099 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 14:50:16 -0400 Subject: [PATCH 09/14] ChatBlock Menu * Renamed style "ChatContextDivider" to "ChatBlockDivider" * Added a menu button label for chat block cells * Added `MakeChatDelimiterCellDingbat` --- Assets/Icons.wxf | Bin 2736 -> 2804 bytes Developer/Resources/Icons/ChatSystemMenu.wl | 316 ++++++++++++++++++++ Developer/Resources/Styles.wl | 69 +++-- Developer/StylesheetBuilder.wl | 1 + FrontEnd/StyleSheets/Chatbook.nb | 4 +- Source/Chatbook/Common.wl | 2 +- Source/Chatbook/Serialization.wl | 4 +- Source/Chatbook/UI.wl | 258 +++++++++++++++- 8 files changed, 619 insertions(+), 35 deletions(-) create mode 100644 Developer/Resources/Icons/ChatSystemMenu.wl diff --git a/Assets/Icons.wxf b/Assets/Icons.wxf index f16fc3a83e924ee101268cbc5e96facdf341ee8d..5d9d469b5526164eec99da953b43f5db9c06c949 100644 GIT binary patch delta 58 zcmdlW`bCt*!pc!&Bg-acem>`n#FF63;*!){-_*R)$&JkV{2+#IFb_y3v^ceBG9!z| J=I6{O*#I-F6OaG^ delta 18 acmew&xk-*rUu6V diff --git a/Developer/Resources/Icons/ChatSystemMenu.wl b/Developer/Resources/Icons/ChatSystemMenu.wl new file mode 100644 index 00000000..0689bf79 --- /dev/null +++ b/Developer/Resources/Icons/ChatSystemMenu.wl @@ -0,0 +1,316 @@ +Graphics[ + { + Thickness[ 0.05 ], + { + FaceForm @ { RGBColor[ 0.50196, 0.56078, 0.59216 ], Opacity[ 1.0 ] }, + FilledCurve[ + { + { + { 1, 4, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 } + } + }, + { + { + { 17.0, 16.0 }, + { 17.0, 16.552 }, + { 16.552, 17.0 }, + { 16.0, 17.0 }, + { 4.0001, 17.0 }, + { 3.4481, 17.0 }, + { 3.0001, 16.552 }, + { 3.0001, 16.0 }, + { 3.0001, 7.0 }, + { 3.0001, 6.448 }, + { 3.4481, 6.0 }, + { 4.0001, 6.0 }, + { 6.0001, 6.0 }, + { 6.0001, 3.0 }, + { 10.0, 6.0 }, + { 16.0, 6.0 }, + { 16.552, 6.0 }, + { 17.0, 6.447 }, + { 17.0, 6.999 }, + { 17.0, 16.0 } + } + } + ] + }, + { + FaceForm @ { RGBColor[ 1.0, 1.0, 1.0 ], Opacity[ 1.0 ] }, + FilledCurve[ + { + { + { 0, 2, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 } + }, + { + { 0, 2, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 } + } + }, + { + { + { 13.603, 10.51 }, + { 13.248, 9.6537 }, + { 12.453, 9.8237 }, + { 11.678, 9.0477 }, + { 11.847, 8.2527 }, + { 10.991, 7.8987 }, + { 10.549, 8.5807 }, + { 9.4526, 8.5807 }, + { 9.0096, 7.8987 }, + { 8.1526, 8.2527 }, + { 8.3226, 9.0477 }, + { 7.5466, 9.8237 }, + { 6.7526, 9.6537 }, + { 6.3976, 10.51 }, + { 7.0796, 10.952 }, + { 7.0796, 12.049 }, + { 6.3976, 12.491 }, + { 6.7526, 13.348 }, + { 7.5466, 13.179 }, + { 8.3226, 13.954 }, + { 8.1526, 14.748 }, + { 9.0096, 15.104 }, + { 9.4526, 14.421 }, + { 10.549, 14.421 }, + { 10.991, 15.104 }, + { 11.847, 14.748 }, + { 11.678, 13.953 }, + { 12.454, 13.179 }, + { 13.248, 13.348 }, + { 13.603, 12.491 }, + { 12.921, 12.049 }, + { 12.921, 10.952 }, + { 13.603, 10.51 } + }, + { + { 14.16, 11.185 }, + { 13.79, 11.425 }, + { 13.79, 11.577 }, + { 14.161, 11.816 }, + { 14.463, 12.013 }, + { 14.582, 12.397 }, + { 14.445, 12.73 }, + { 14.012, 13.774 }, + { 13.876, 14.102 }, + { 13.515, 14.295 }, + { 13.165, 14.218 }, + { 12.733, 14.126 }, + { 12.626, 14.233 }, + { 12.719, 14.665 }, + { 12.794, 15.018 }, + { 12.607, 15.375 }, + { 12.273, 15.512 }, + { 11.229, 15.946 }, + { 10.903, 16.08 }, + { 10.509, 15.956 }, + { 10.317, 15.66 }, + { 10.076, 15.29 }, + { 9.9236, 15.29 }, + { 9.6836, 15.66 }, + { 9.4936, 15.955 }, + { 9.1066, 16.082 }, + { 8.7706, 15.945 }, + { 7.7266, 15.512 }, + { 7.3946, 15.375 }, + { 7.2076, 15.019 }, + { 7.2816, 14.666 }, + { 7.3736, 14.233 }, + { 7.2666, 14.126 }, + { 6.8366, 14.218 }, + { 6.4886, 14.296 }, + { 6.1266, 14.105 }, + { 5.9876, 13.774 }, + { 5.5566, 12.73 }, + { 5.4186, 12.398 }, + { 5.5376, 12.013 }, + { 5.8396, 11.816 }, + { 6.2106, 11.577 }, + { 6.2106, 11.425 }, + { 5.8396, 11.185 }, + { 5.5366, 10.988 }, + { 5.4186, 10.604 }, + { 5.5566, 10.271 }, + { 5.9886, 9.2267 }, + { 6.1056, 8.9477 }, + { 6.3766, 8.7667 }, + { 6.6786, 8.7667 }, + { 6.7356, 8.7667 }, + { 6.7876, 8.7717 }, + { 6.8356, 8.7827 }, + { 7.2666, 8.8747 }, + { 7.3736, 8.7677 }, + { 7.2816, 8.3347 }, + { 7.2076, 7.9827 }, + { 7.3946, 7.6277 }, + { 7.7266, 7.4887 }, + { 8.7716, 7.0567 }, + { 9.1056, 6.9197 }, + { 9.4946, 7.0457 }, + { 9.6836, 7.3407 }, + { 9.9236, 7.7117 }, + { 10.076, 7.7117 }, + { 10.317, 7.3407 }, + { 10.454, 7.1277 }, + { 10.689, 6.9997 }, + { 10.944, 6.9997 }, + { 11.041, 6.9997 }, + { 11.14, 7.0197 }, + { 11.229, 7.0567 }, + { 12.269, 7.4867 }, + { 12.605, 7.6257 }, + { 12.794, 7.9827 }, + { 12.719, 8.3357 }, + { 12.626, 8.7677 }, + { 12.733, 8.8747 }, + { 13.164, 8.7827 }, + { 13.214, 8.7717 }, + { 13.266, 8.7667 }, + { 13.322, 8.7667 }, + { 13.625, 8.7667 }, + { 13.896, 8.9477 }, + { 14.013, 9.2277 }, + { 14.444, 10.272 }, + { 14.583, 10.604 }, + { 14.464, 10.988 }, + { 14.16, 11.185 } + } + } + ] + }, + { + FaceForm @ { RGBColor[ 1.0, 1.0, 1.0 ], Opacity[ 1.0 ] }, + FilledCurve[ + { + { { 1, 4, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 } }, + { { 1, 4, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 } } + }, + { + { + { 9.9998, 10.371 }, + { 9.3768, 10.371 }, + { 8.8708, 10.878 }, + { 8.8708, 11.501 }, + { 8.8708, 12.123 }, + { 9.3768, 12.63 }, + { 9.9998, 12.63 }, + { 10.623, 12.63 }, + { 11.13, 12.123 }, + { 11.13, 11.501 }, + { 11.13, 10.878 }, + { 10.623, 10.371 }, + { 9.9998, 10.371 } + }, + { + { 9.9998, 13.499 }, + { 8.8978, 13.499 }, + { 8.0008, 12.602 }, + { 8.0008, 11.501 }, + { 8.0008, 10.399 }, + { 8.8978, 9.5019 }, + { 9.9998, 9.5019 }, + { 11.102, 9.5019 }, + { 11.999, 10.399 }, + { 11.999, 11.501 }, + { 11.999, 12.602 }, + { 11.102, 13.499 }, + { 9.9998, 13.499 } + } + } + ] + } + }, + AspectRatio -> Automatic, + ImageSize -> { { 21.0, 21.0 }, { 21.0, 21.0 } }, + PlotRange -> { { -0.5, 20.5 }, { -0.5, 20.5 } } +] \ No newline at end of file diff --git a/Developer/Resources/Styles.wl b/Developer/Resources/Styles.wl index 67cc9202..67582635 100644 --- a/Developer/Resources/Styles.wl +++ b/Developer/Resources/Styles.wl @@ -251,36 +251,40 @@ Cell[ (* ::**************************************************************************************************************:: *) (* ::Subsection::Closed:: *) -(*ChatContextDivider*) +(*ChatBlockDivider*) Cell[ - StyleData[ "ChatContextDivider", StyleDefinitions -> StyleData[ "Section" ] ], + StyleData[ "ChatBlockDivider", StyleDefinitions -> StyleData[ "Section" ] ], CellFrame -> { { 0, 0 }, { 0, 8 } }, CellFrameColor -> GrayLevel[ 0.74902 ], CellGroupingRules -> { "SectionGrouping", 30 }, - CellMargins -> { { 66, 25 }, { Inherited, Inherited } }, + CellMargins -> { { 5, 25 }, { Inherited, Inherited } }, CellTrayWidgets -> <| "ChatWidget" -> <| "Visible" -> False |> |>, CounterAssignments -> { { "ChatInputCount", 0 } }, DefaultNewCellStyle -> "Input", FontColor -> GrayLevel[ 0.2 ], FontWeight -> "DemiBold", ShowCellLabel -> False, + StyleKeyMapping -> { "~" -> "ChatDelimiter", "'" -> "ChatInput" }, - StyleKeyMapping -> { "~" -> "ChatDelimiter", "'" -> "ChatInput" }, - - menuInitializer[ "ChatSection", GrayLevel[ 0.925 ] ], - - CellDingbat -> Cell[ - BoxData @ DynamicBox @ ToBoxes[ - If[ TrueQ @ CloudSystem`$CloudNotebooks, - RawBoxes @ TemplateBox[ { }, "RoleUser" ], - RawBoxes @ TemplateBox[ { }, "ChatInputActiveCellDingbat" ] + CellFrameLabels -> { + { + Cell[ + BoxData @ DynamicBox @ ToBoxes[ + If[ TrueQ @ CloudSystem`$CloudNotebooks, + "", + RawBoxes @ TemplateBox[ { }, "ChatDelimiterCellDingbat" ] + ], + StandardForm + ], + "Text", + Background -> None, + CellFrame -> 0, + CellMargins -> 0 ], - StandardForm - ], - Background -> None, - CellFrame -> 0, - CellMargins -> 0 - ] + None + }, + { None, None } + } ] (* ::**************************************************************************************************************:: *) @@ -304,7 +308,7 @@ Cell[ CurrentValue[ "EventKey" ], "UpArrow"|"LeftArrow", SelectionMove[ EvaluationCell[ ], Before, Cell ], "~", ( - NotebookWrite[ EvaluationCell[ ], Cell[ "", "ChatContextDivider" ], All ]; + NotebookWrite[ EvaluationCell[ ], Cell[ "", "ChatBlockDivider" ], All ]; SelectionMove[ EvaluationNotebook[ ], Before, CellContents ]; ), "'", ( @@ -321,20 +325,17 @@ Cell[ Cell[ BoxData @ DynamicBox @ ToBoxes[ If[ TrueQ @ CloudSystem`$CloudNotebooks, - RawBoxes @ TemplateBox[ { }, "RoleUser" ], - RawBoxes @ TemplateBox[ { }, "ChatInputActiveCellDingbat" ] + "", + RawBoxes @ TemplateBox[ { }, "ChatDelimiterCellDingbat" ] ], StandardForm ], - Background -> None, - CellFrame -> 0, - CellMargins -> 0 + Background -> None, + CellFrame -> 0, + CellMargins -> 0, + Magnification -> 0.75 Inherited ], - Cell[ - BoxData @ TemplateBox[ { "ChatSection", GrayLevel[ 0.925 ] }, "ChatMenuButton" ], - "ChatMenu", - Background -> None - ] + None }, { None, None } }, @@ -342,6 +343,16 @@ Cell[ Initialization :> NotebookDelete @ Cells[ EvaluationCell[ ], AttachedCell -> True, CellStyle -> "ChatMenu" ] ] +(* ::**************************************************************************************************************:: *) +(* ::Subsubsection::Closed:: *) +(*ChatDelimiterCellDingbat*) +Cell[ + StyleData[ "ChatDelimiterCellDingbat" ], + TemplateBoxOptions -> { + DisplayFunction -> Function @ Evaluate @ ToBoxes @ $chatDelimiterCellDingbat + } +] + (* ::**************************************************************************************************************:: *) (* ::Section::Closed:: *) (*Chat Output Formatting*) diff --git a/Developer/StylesheetBuilder.wl b/Developer/StylesheetBuilder.wl index 2a0f72c4..68b499bc 100644 --- a/Developer/StylesheetBuilder.wl +++ b/Developer/StylesheetBuilder.wl @@ -351,6 +351,7 @@ tabbedChatOutputCellDingbat[ arg_ ] := Column[ $chatInputActiveCellDingbat = Wolfram`Chatbook`UI`MakeChatInputActiveCellDingbat[ ]; $chatInputCellDingbat = Wolfram`Chatbook`UI`MakeChatInputCellDingbat[ ]; +$chatDelimiterCellDingbat = Wolfram`Chatbook`UI`MakeChatDelimiterCellDingbat[ ]; (* ::**************************************************************************************************************:: *) (* ::Subsubsection::Closed:: *) diff --git a/FrontEnd/StyleSheets/Chatbook.nb b/FrontEnd/StyleSheets/Chatbook.nb index 145c78cd..c94316ac 100644 --- a/FrontEnd/StyleSheets/Chatbook.nb +++ b/FrontEnd/StyleSheets/Chatbook.nb @@ -1538,7 +1538,7 @@ Notebook[ ], Cell[ StyleData[ - "ChatContextDivider", + "ChatBlockDivider", StyleDefinitions -> StyleData["Section"] ], CellFrame -> {{0, 0}, {0, 8}}, @@ -1620,7 +1620,7 @@ Notebook[ NotebookWrite[ EvaluationCell[], - Cell["", "ChatContextDivider"], + Cell["", "ChatBlockDivider"], All ]; diff --git a/Source/Chatbook/Common.wl b/Source/Chatbook/Common.wl index 572e4f1d..d4eb2afd 100644 --- a/Source/Chatbook/Common.wl +++ b/Source/Chatbook/Common.wl @@ -37,7 +37,7 @@ $cloudNotebooks := TrueQ @ CloudSystem`$CloudNotebooks; (* ::**************************************************************************************************************:: *) (* ::Section::Closed:: *) (*Config*) -$chatDelimiterStyles = { "ChatContextDivider", "ChatDelimiter", "ExcludedChatDelimiter" }; +$chatDelimiterStyles = { "ChatBlockDivider", "ChatDelimiter", "ExcludedChatDelimiter" }; $chatIgnoredStyles = { "ChatExcluded" }; $chatInputStyles = { "ChatInput", "SideChat", "ChatQuery", "ChatSystemInput" }; $chatOutputStyles = { "ChatOutput" }; diff --git a/Source/Chatbook/Serialization.wl b/Source/Chatbook/Serialization.wl index 92989863..21d3f02f 100644 --- a/Source/Chatbook/Serialization.wl +++ b/Source/Chatbook/Serialization.wl @@ -25,7 +25,7 @@ Needs[ "Wolfram`Chatbook`Prompting`" ]; (*Config*) $$delimiterStyle = "PageBreak"|"ExampleDelimiter"|"ChatDelimiter"; $$itemStyle = "Item"|"Notes"; -$$noCellLabelStyle = "Text"|"ChatInput"|"SideChat"|"ChatSystemInput"|"ChatContextDivider"|$$delimiterStyle; +$$noCellLabelStyle = "Text"|"ChatInput"|"SideChat"|"ChatSystemInput"|"ChatBlockDivider"|$$delimiterStyle; $$docSearchStyle = "ChatQuery"; (* Default character encoding for strings created from cells *) @@ -342,7 +342,7 @@ fasterCellToString0[ (Cell|StyleBox)[ a_, "Subsection", ___ ] ] := "## "<>faster fasterCellToString0[ (Cell|StyleBox)[ a_, "Subsubsection", ___ ] ] := "### "<>fasterCellToString0 @ a; fasterCellToString0[ (Cell|StyleBox)[ a_, "Subsubsubsection", ___ ] ] := "#### "<>fasterCellToString0 @ a; fasterCellToString0[ (Cell|StyleBox)[ a_, "Subsubsubsubsection", ___ ] ] := "##### "<>fasterCellToString0 @ a; -fasterCellToString0[ (Cell|StyleBox)[ a_, "ChatContextDivider", ___ ] ] := "# "<>fasterCellToString0 @ a; +fasterCellToString0[ (Cell|StyleBox)[ a_, "ChatBlockDivider", ___ ] ] := "# "<>fasterCellToString0 @ a; (* ::**************************************************************************************************************:: *) (* ::Subsubsubsection::Closed:: *) diff --git a/Source/Chatbook/UI.wl b/Source/Chatbook/UI.wl index b2fa09e7..447dbac0 100644 --- a/Source/Chatbook/UI.wl +++ b/Source/Chatbook/UI.wl @@ -22,6 +22,7 @@ ChatContextEpilogFunction MakeChatInputActiveCellDingbat MakeChatInputCellDingbat +MakeChatDelimiterCellDingbat GetChatInputLLMConfigurationSelectorMenuData Begin["`Private`"] @@ -960,7 +961,7 @@ GetAllCellsInChatContext[ dividerCellPos = Flatten[ Map[ Position[allCells, #] &, - Cells[nb, CellStyle -> "ChatContextDivider"] + Cells[nb, CellStyle -> "ChatBlockDivider"] ] ]; @@ -1378,6 +1379,50 @@ MakeChatInputCellDingbat[] := ImageSize -> All ] + +MakeChatDelimiterCellDingbat[] := Module[{ + menuLabel, + button +}, + (*-----------------------------------------*) + (* Construct the action menu display label *) + (*-----------------------------------------*) + + menuLabel = RawBoxes @ TemplateBox[ { }, "ChatSystemMenu" ]; + + button = Button[ + Framed[ + Pane[menuLabel, Alignment -> {Center, Center}, ImageSize -> {25, 25}, ImageSizeAction -> "ShrinkToFit"], + RoundingRadius -> 2, + FrameStyle -> Dynamic[ + If[CurrentValue["MouseOver"], GrayLevel[0.74902], GrayLevel[0, 0]] + ], + Background -> Dynamic[ + If[CurrentValue["MouseOver"], GrayLevel[0.960784], GrayLevel[1]] + ], + FrameMargins -> 0, + ImageMargins -> 0, + ContentPadding -> False + ], + ( + AttachCell[ + EvaluationCell[], + openChatDelimiterActionMenu[EvaluationCell[]], + {Left, Bottom}, + Offset[{0, 0}, {Left, Top}], + {Left, Top}, + RemovalConditions -> {"EvaluatorQuit", "MouseClickOutside"} + ]; + ), + Appearance -> $suppressButtonAppearance, + ImageMargins -> 0, + FrameMargins -> 0, + ContentPadding -> False + ]; + + button +]; + (*====================================*) SetFallthroughError[openChatInputActionMenu] @@ -1454,6 +1499,80 @@ openChatInputActionMenu[dingbatCellObj_CellObject] := With[{ (*====================================*) +SetFallthroughError[openChatDelimiterActionMenu] + +openChatDelimiterActionMenu[dingbatCellObj_CellObject] := With[{ + chatInputCellObj = parentCell[dingbatCellObj] +}, Module[{ + menuData = GetChatInputLLMConfigurationSelectorMenuData[], + actionCallback, + actionMenu +}, + actionCallback = Function[{field, value}, Replace[field, { + "Persona" :> ( + CurrentValue[ + chatInputCellObj, + {TaggingRules, "ChatNotebookSettings", "LLMEvaluator"} + ] = value; + NotebookDelete[Cells[dingbatCellObj, AttachedCell->True]]; + SetOptions[chatInputCellObj, CellDingbat -> Inherited]; + ), + "Model" :> ( + CurrentValue[ + chatInputCellObj, + {TaggingRules, "ChatNotebookSettings", "Model"} + ] = value; + NotebookDelete[Cells[dingbatCellObj, AttachedCell->True]]; + ), + "Role" :> ( + CurrentValue[ + chatInputCellObj, + {TaggingRules, "ChatNotebookSettings", "Role"} + ] = value; + NotebookDelete[Cells[dingbatCellObj, AttachedCell->True]]; + ), + other_ :> ( + ChatbookWarning[ + "Unexpected field set from LLM configuration action menu: `` => ``", + InputForm[other], + InputForm[value] + ]; + ) + }]]; + + makeChatDelimiterActionMenuContent[ + menuData["Personas"], + menuData["Models"], + "ActionCallback" -> actionCallback, + "PersonaValue" -> currentValueOrigin[ + chatInputCellObj, + {TaggingRules, "ChatNotebookSettings", "LLMEvaluator"} + ], + "ModelValue" -> currentValueOrigin[ + chatInputCellObj, + {TaggingRules, "ChatNotebookSettings", "Model"} + ], + "RoleValue" -> currentValueOrigin[ + chatInputCellObj, + {TaggingRules, "ChatNotebookSettings", "Role"} + ], + "TemperatureValue" -> Dynamic[ + CurrentValue[ + (* "ChatInput" > CellDingbat > Persona Menu > Advanced Menu *) + chatInputCellObj, + { TaggingRules, "ChatNotebookSettings", "TemperatureSetting" }, + currentChatSettings[ chatInputCellObj, "Temperature" ] + ], + Function[ + CurrentValue[ chatInputCellObj, { TaggingRules, "ChatNotebookSettings", "TemperatureSetting" } ] = + CurrentValue[ chatInputCellObj, { TaggingRules, "ChatNotebookSettings", "Temperature" } ] = #1; + ] + ] + ] +]] + +(*====================================*) + SetFallthroughError[currentValueOrigin] (* @@ -1656,6 +1775,143 @@ makeChatInputActionMenuContent[ menu ]] +(*====================================*) + +SetFallthroughError[makeChatDelimiterActionMenuContent] + +Options[makeChatDelimiterActionMenuContent] = { + "PersonaValue" -> Automatic, + "ModelValue" -> Automatic, + "RoleValue" -> Automatic, + "TemperatureValue" -> Automatic, + "ActionCallback" -> (Null &) +} + +makeChatDelimiterActionMenuContent[ + (* List of {tagging rule value, icon, list item label} *) + personas:{___List}, + (* List of {tagging rule value, icon, list item label} *) + models:{___List}, + OptionsPattern[] +] := With[{ + callback = OptionValue["ActionCallback"] +}, Module[{ + personaValue = OptionValue["PersonaValue"], + modelValue = OptionValue["ModelValue"], + roleValue = OptionValue["RoleValue"], + tempValue = OptionValue["TemperatureValue"], + advancedSettingsMenu, + menuLabel, + menuItems +}, + + (*-------------------------------------------------*) + (* Construct the Advanced Settings submenu content *) + (*-------------------------------------------------*) + + advancedSettingsMenu = Join[ + { + "Temperature", + { + None, + Pane[ + Slider[ + tempValue, + { 0, 2, 0.01 }, + ImageSize -> { 140, Automatic }, + ImageMargins -> {{5, 0}, {5, 5}}, + Appearance -> "Labeled" + ], + ImageSize -> { 180, Automatic }, + BaseStyle -> { FontSize -> 12 } + ], + None + } + }, + {"Models"}, + Map[ + entry |-> ConfirmReplace[entry, { + {model_?StringQ, icon_, listItemLabel_} :> { + alignedMenuIcon[model, modelValue, icon], + listItemLabel, + Hold[callback["Model", model]] + } + }], + models + ], + {"Roles"}, + Map[ + entry |-> ConfirmReplace[entry, { + {role_?StringQ, icon_} :> { + alignedMenuIcon[role, roleValue, icon], + role, + Hold[callback["Role", role]] + } + }], + { + {"User", getIcon["RoleUser"]}, + {"System", getIcon["RoleSystem"]} + } + ] + ]; + + advancedSettingsMenu = MakeMenu[ + advancedSettingsMenu, + GrayLevel[0.85], + 200 + ]; + + (*------------------------------------*) + (* Construct the popup menu item list *) + (*------------------------------------*) + + menuItems = Join[ + {"Personas"}, + Map[ + entry |-> ConfirmReplace[entry, { + {persona_?StringQ, icon_, listItemLabel_} :> { + alignedMenuIcon[persona, personaValue, icon], + listItemLabel, + Hold[callback["Persona", persona]] + } + }], + personas + ], + { + Delimiter, + {alignedMenuIcon[getIcon["PersonaOther"]], "Add & Manage Personas\[Ellipsis]", "PersonaManage"}, + {alignedMenuIcon[getIcon["PersonaFromURL"]], "Install From URL\[Ellipsis]", "PersonaURLInstall"}, + Delimiter, + { + alignedMenuIcon[getIcon["AdvancedSettings"]], + Grid[ + {{ + Item["Advanced Settings", ItemSize -> Fit, Alignment -> Left], + RawBoxes[TemplateBox[{}, "Triangle"]] + }}, + Spacings -> 0 + ], + Hold[AttachCell[ + EvaluationCell[], + advancedSettingsMenu, + {Right, Bottom}, + {50, 50}, + {Left, Bottom}, + RemovalConditions -> "MouseExit" + ]] + } + } + ]; + + menu = MakeMenu[ + menuItems, + GrayLevel[0.85], + 225 + ]; + + menu +]] + (*------------------------------------*) SetFallthroughError[alignedMenuIcon] From 99ba958945d27e50c7da2bf60f32fb75716a9a2d Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 15:08:18 -0400 Subject: [PATCH 10/14] Added menu item to open chat block settings --- Assets/Icons.wxf | Bin 2804 -> 2894 bytes .../Icons/ChatBlockSettingsMenuIcon.wl | 318 ++++++++++++ FrontEnd/StyleSheets/Chatbook.nb | 466 +++++++++++++++--- Source/Chatbook/Actions.wl | 8 + Source/Chatbook/UI.wl | 6 + 5 files changed, 741 insertions(+), 57 deletions(-) create mode 100644 Developer/Resources/Icons/ChatBlockSettingsMenuIcon.wl diff --git a/Assets/Icons.wxf b/Assets/Icons.wxf index 5d9d469b5526164eec99da953b43f5db9c06c949..0dc3dbf4278bec2085571895a21a2b33d534bb39 100644 GIT binary patch delta 77 zcmew&dQObR!pc!|BMTdon51(?Vu@2uesXqjYDr0EUV5=_YF_E&gIpTY*rhy^^Ye5k NJ1~iCmSwum0RZq?8fE|h delta 18 ZcmX>n_C=J%!pc!&BMTeT<`kw^8~`{X1(g5* diff --git a/Developer/Resources/Icons/ChatBlockSettingsMenuIcon.wl b/Developer/Resources/Icons/ChatBlockSettingsMenuIcon.wl new file mode 100644 index 00000000..3351db30 --- /dev/null +++ b/Developer/Resources/Icons/ChatBlockSettingsMenuIcon.wl @@ -0,0 +1,318 @@ +Graphics[ + { + Thickness[ 0.05 ], + { + EdgeForm @ { RGBColor[ 0.50196, 0.56078, 0.59216 ], Opacity[ 1.0 ], Thickness[ 0.04 ] }, + FaceForm @ GrayLevel[ 1 ], + FilledCurve[ + { + { + { 1, 4, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 } + } + }, + { + { + { 17.0, 16.0 }, + { 17.0, 16.552 }, + { 16.552, 17.0 }, + { 16.0, 17.0 }, + { 4.0001, 17.0 }, + { 3.4481, 17.0 }, + { 3.0001, 16.552 }, + { 3.0001, 16.0 }, + { 3.0001, 7.0 }, + { 3.0001, 6.448 }, + { 3.4481, 6.0 }, + { 4.0001, 6.0 }, + { 6.0001, 6.0 }, + { 6.0001, 3.0 }, + { 10.0, 6.0 }, + { 16.0, 6.0 }, + { 16.552, 6.0 }, + { 17.0, 6.447 }, + { 17.0, 6.999 }, + { 17.0, 16.0 } + } + } + ] + }, + { + FaceForm @ { RGBColor[ 0.50196, 0.56078, 0.59216 ], Opacity[ 1.0 ] }, + FilledCurve[ + { + { + { 0, 2, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 } + }, + { + { 0, 2, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 0, 1, 0 }, + { 1, 3, 3 }, + { 1, 3, 3 }, + { 0, 1, 0 }, + { 1, 3, 3 } + } + }, + { + { + { 13.603, 10.51 }, + { 13.248, 9.6537 }, + { 12.453, 9.8237 }, + { 11.678, 9.0477 }, + { 11.847, 8.2527 }, + { 10.991, 7.8987 }, + { 10.549, 8.5807 }, + { 9.4526, 8.5807 }, + { 9.0096, 7.8987 }, + { 8.1526, 8.2527 }, + { 8.3226, 9.0477 }, + { 7.5466, 9.8237 }, + { 6.7526, 9.6537 }, + { 6.3976, 10.51 }, + { 7.0796, 10.952 }, + { 7.0796, 12.049 }, + { 6.3976, 12.491 }, + { 6.7526, 13.348 }, + { 7.5466, 13.179 }, + { 8.3226, 13.954 }, + { 8.1526, 14.748 }, + { 9.0096, 15.104 }, + { 9.4526, 14.421 }, + { 10.549, 14.421 }, + { 10.991, 15.104 }, + { 11.847, 14.748 }, + { 11.678, 13.953 }, + { 12.454, 13.179 }, + { 13.248, 13.348 }, + { 13.603, 12.491 }, + { 12.921, 12.049 }, + { 12.921, 10.952 }, + { 13.603, 10.51 } + }, + { + { 14.16, 11.185 }, + { 13.79, 11.425 }, + { 13.79, 11.577 }, + { 14.161, 11.816 }, + { 14.463, 12.013 }, + { 14.582, 12.397 }, + { 14.445, 12.73 }, + { 14.012, 13.774 }, + { 13.876, 14.102 }, + { 13.515, 14.295 }, + { 13.165, 14.218 }, + { 12.733, 14.126 }, + { 12.626, 14.233 }, + { 12.719, 14.665 }, + { 12.794, 15.018 }, + { 12.607, 15.375 }, + { 12.273, 15.512 }, + { 11.229, 15.946 }, + { 10.903, 16.08 }, + { 10.509, 15.956 }, + { 10.317, 15.66 }, + { 10.076, 15.29 }, + { 9.9236, 15.29 }, + { 9.6836, 15.66 }, + { 9.4936, 15.955 }, + { 9.1066, 16.082 }, + { 8.7706, 15.945 }, + { 7.7266, 15.512 }, + { 7.3946, 15.375 }, + { 7.2076, 15.019 }, + { 7.2816, 14.666 }, + { 7.3736, 14.233 }, + { 7.2666, 14.126 }, + { 6.8366, 14.218 }, + { 6.4886, 14.296 }, + { 6.1266, 14.105 }, + { 5.9876, 13.774 }, + { 5.5566, 12.73 }, + { 5.4186, 12.398 }, + { 5.5376, 12.013 }, + { 5.8396, 11.816 }, + { 6.2106, 11.577 }, + { 6.2106, 11.425 }, + { 5.8396, 11.185 }, + { 5.5366, 10.988 }, + { 5.4186, 10.604 }, + { 5.5566, 10.271 }, + { 5.9886, 9.2267 }, + { 6.1056, 8.9477 }, + { 6.3766, 8.7667 }, + { 6.6786, 8.7667 }, + { 6.7356, 8.7667 }, + { 6.7876, 8.7717 }, + { 6.8356, 8.7827 }, + { 7.2666, 8.8747 }, + { 7.3736, 8.7677 }, + { 7.2816, 8.3347 }, + { 7.2076, 7.9827 }, + { 7.3946, 7.6277 }, + { 7.7266, 7.4887 }, + { 8.7716, 7.0567 }, + { 9.1056, 6.9197 }, + { 9.4946, 7.0457 }, + { 9.6836, 7.3407 }, + { 9.9236, 7.7117 }, + { 10.076, 7.7117 }, + { 10.317, 7.3407 }, + { 10.454, 7.1277 }, + { 10.689, 6.9997 }, + { 10.944, 6.9997 }, + { 11.041, 6.9997 }, + { 11.14, 7.0197 }, + { 11.229, 7.0567 }, + { 12.269, 7.4867 }, + { 12.605, 7.6257 }, + { 12.794, 7.9827 }, + { 12.719, 8.3357 }, + { 12.626, 8.7677 }, + { 12.733, 8.8747 }, + { 13.164, 8.7827 }, + { 13.214, 8.7717 }, + { 13.266, 8.7667 }, + { 13.322, 8.7667 }, + { 13.625, 8.7667 }, + { 13.896, 8.9477 }, + { 14.013, 9.2277 }, + { 14.444, 10.272 }, + { 14.583, 10.604 }, + { 14.464, 10.988 }, + { 14.16, 11.185 } + } + } + ] + }, + { + FaceForm @ { RGBColor[ 0.50196, 0.56078, 0.59216 ], Opacity[ 1.0 ] }, + FilledCurve[ + { + { { 1, 4, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 } }, + { { 1, 4, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 } } + }, + { + { + { 9.9998, 10.371 }, + { 9.3768, 10.371 }, + { 8.8708, 10.878 }, + { 8.8708, 11.501 }, + { 8.8708, 12.123 }, + { 9.3768, 12.63 }, + { 9.9998, 12.63 }, + { 10.623, 12.63 }, + { 11.13, 12.123 }, + { 11.13, 11.501 }, + { 11.13, 10.878 }, + { 10.623, 10.371 }, + { 9.9998, 10.371 } + }, + { + { 9.9998, 13.499 }, + { 8.8978, 13.499 }, + { 8.0008, 12.602 }, + { 8.0008, 11.501 }, + { 8.0008, 10.399 }, + { 8.8978, 9.5019 }, + { 9.9998, 9.5019 }, + { 11.102, 9.5019 }, + { 11.999, 10.399 }, + { 11.999, 11.501 }, + { 11.999, 12.602 }, + { 11.102, 13.499 }, + { 9.9998, 13.499 } + } + } + ] + } + }, + AspectRatio -> Automatic, + BaselinePosition -> Scaled[ 0.288 ], + ImageSize -> { { 21.0, 21.0 }, { 21.0, 21.0 } }, + PlotRange -> { { -0.5, 20.5 }, { -0.5, 20.5 } } +] \ No newline at end of file diff --git a/FrontEnd/StyleSheets/Chatbook.nb b/FrontEnd/StyleSheets/Chatbook.nb index c94316ac..ef7ca4b1 100644 --- a/FrontEnd/StyleSheets/Chatbook.nb +++ b/FrontEnd/StyleSheets/Chatbook.nb @@ -1542,55 +1542,35 @@ Notebook[ StyleDefinitions -> StyleData["Section"] ], CellFrame -> {{0, 0}, {0, 8}}, - CellDingbat -> - Cell[ - BoxData[ - DynamicBox[ - ToBoxes[ - If[ TrueQ[CloudSystem`$CloudNotebooks], - RawBoxes[TemplateBox[{}, "RoleUser"]], - RawBoxes[TemplateBox[{}, "ChatInputActiveCellDingbat"]] - ], - StandardForm - ] - ] - ], - Background -> None, - CellFrame -> 0, - CellMargins -> 0 - ], - CellMargins -> {{66, 25}, {Inherited, Inherited}}, + CellMargins -> {{5, 25}, {Inherited, Inherited}}, StyleKeyMapping -> {"~" -> "ChatDelimiter", "'" -> "ChatInput"}, CellGroupingRules -> {"SectionGrouping", 30}, CellTrayWidgets -> <|"ChatWidget" -> <|"Visible" -> False|>|>, - Initialization :> - If[ Not[TrueQ[CloudSystem`$CloudNotebooks]], - With[ { cell$ = EvaluationCell[] }, - - NotebookDelete[ - Cells[cell$, AttachedCell -> True, CellStyle -> "ChatMenu"] - ]; - - AttachCell[ - cell$, - Cell[ - BoxData[ - TemplateBox[ - {"ChatSection", GrayLevel[0.925]}, - "ChatMenuButton" - ] - ], - "ChatMenu" - ], - {Right, Top}, - Offset[{-7, -7}, {Right, Top}], - {Right, Top}, - RemovalConditions -> {"EvaluatorQuit"} - ] - ] - ], ShowCellLabel -> False, CellFrameColor -> GrayLevel[0.74902], + CellFrameLabels -> { + { + Cell[ + BoxData[ + DynamicBox[ + ToBoxes[ + If[ TrueQ[CloudSystem`$CloudNotebooks], + "", + RawBoxes[TemplateBox[{}, "ChatDelimiterCellDingbat"]] + ], + StandardForm + ] + ] + ], + "Text", + Background -> None, + CellFrame -> 0, + CellMargins -> 0 + ], + None + }, + {None, None} + }, DefaultNewCellStyle -> "Input", CounterAssignments -> {{"ChatInputCount", 0}}, FontWeight -> "DemiBold", @@ -1650,8 +1630,8 @@ Notebook[ DynamicBox[ ToBoxes[ If[ TrueQ[CloudSystem`$CloudNotebooks], - RawBoxes[TemplateBox[{}, "RoleUser"]], - RawBoxes[TemplateBox[{}, "ChatInputActiveCellDingbat"]] + "", + RawBoxes[TemplateBox[{}, "ChatDelimiterCellDingbat"]] ], StandardForm ] @@ -1659,18 +1639,10 @@ Notebook[ ], Background -> None, CellFrame -> 0, - CellMargins -> 0 + CellMargins -> 0, + Magnification -> 0.75 * Inherited ], - Cell[ - BoxData[ - TemplateBox[ - {"ChatSection", GrayLevel[0.925]}, - "ChatMenuButton" - ] - ], - "ChatMenu", - Background -> None - ] + None }, {None, None} }, @@ -1679,6 +1651,66 @@ Notebook[ FontSize -> 6, Background -> GrayLevel[0.95] ], + Cell[ + StyleData["ChatDelimiterCellDingbat"], + TemplateBoxOptions -> { + DisplayFunction -> + (Function[ + ButtonBox[ + FrameBox[ + PaneBox[ + TemplateBox[{}, "ChatSystemMenu"], + Alignment -> {Center, Center}, + ImageSize -> {25, 25}, + ImageSizeAction -> "ShrinkToFit" + ], + RoundingRadius -> 2, + FrameStyle -> + Dynamic[ + If[ CurrentValue["MouseOver"], + GrayLevel[0.74902], + GrayLevel[0, 0] + ] + ], + Background -> + Dynamic[ + If[ CurrentValue["MouseOver"], + GrayLevel[0.96078], + GrayLevel[1] + ] + ], + FrameMargins -> 0, + ImageMargins -> 0, + ContentPadding -> False, + StripOnInput -> False + ], + ButtonFunction :> + (AttachCell[ + EvaluationCell[], + Wolfram`Chatbook`UI`Private`openChatDelimiterActionMenu[ + EvaluationCell[] + ], + {Left, Bottom}, + Offset[{0, 0}, {Left, Top}], + {Left, Top}, + RemovalConditions -> {"EvaluatorQuit", "MouseClickOutside"} + ];), + Appearance -> + Dynamic[ + FEPrivate`FrontEndResource[ + "FEExpressions", + "SuppressMouseDownNinePatchAppearance" + ] + ], + ImageMargins -> 0, + FrameMargins -> 0, + ContentPadding -> False, + Evaluator -> Automatic, + Method -> "Preemptive" + ] + ]) + } + ], Cell[ StyleData["ChatCodeBlock"], Background -> GrayLevel[1] @@ -3036,6 +3068,171 @@ Notebook[ ]) } ], + Cell[ + StyleData["ChatBlockSettingsMenuIcon"], + TemplateBoxOptions -> { + DisplayFunction -> + (Function[ + GraphicsBox[ + { + Thickness[0.05], + { + EdgeForm[ + { + RGBColor[0.50196, 0.56078, 0.59216], + Opacity[1.], + Thickness[0.04] + } + ], + FaceForm[GrayLevel[1]], + FilledCurveBox[ + { + { + {1, 4, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0} + } + }, + CompressedData[ + "\n1:eJxTTMoPSmVmYGBgBGIRIGZigAFDBwht4ADjR6VY3/fvNYDTuNTJvH5kJsUg\nAOdnbH5VvHUqN5xvee1orgkDB9wcGB9mDipfBs6fkSfUfOCUJJp5Emj2wfgS\nOPgwc1Xg8qjul0DzH0ze0KHW3jRu10lJOP/pBaXbP/9JY4QDAHoEQIQ=\n " + ] + ] + }, + { + FaceForm[ + {RGBColor[0.50196, 0.56078, 0.59216], Opacity[1.]} + ], + FilledCurveBox[ + { + { + {0, 2, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0} + }, + { + {0, 2, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3} + } + }, + { + CompressedData[ + "\n1:eJxTTMoPSmViYGBQBGIQfftnXdYeE22H1teBO+RYVR2eXlACCmk5RJwyOrLR\nT9mBT3fT3PfPNRz08xYz7lmq7OCUAFQRre5wlTNDKUdCyaE75/nvlRvVHf6l\nfn+S2KjgwLFGJirlt6qD1krhCy4z5B14mLTbxSRVHXgmr2wK1FR0uBb2Rn/3\ncyU431e0x+sVixJcvc3eoGmKfgpw84QTD1/WXqoAt6/oJ//L7fpycPfcf8A9\neSWTNNy9n/uCS1SmS8L985AbZJGMQ+NUZ6BTEXyIuzTg6iHu1oCbJ8kSBvS6\nFty+89+DHy+N1oK7Z84RhQ1FL7Th7oWEmy7cPxkT39bYm+rB/Ztifd+/97oO\nPDxgfFh4wdTDwhNmHiy8IfGgDbVXA+4eWHzB3AuLT5h/IPZowv0L48PCAz3+\nAcYL3Ok=\n " + ], + CompressedData[ + "\n1:eJxdVAlME1EQrQh4REUJtIUesqUt3e62lQQQT4aggifhEMUDFTUhBsQgRELU\ncEQBCwoRBbwFCTF4n3hEiSIeGKIGATVeoAFFQBRRg0T/dneHxE22m/c7/8/M\ne28+FZsYvt5OIpEsIy/3Da9W7+gMY2Ei+a2O0YPLmeD3aUUMHCglz4shnLEv\nyBrv5QVvQ/OLN4azkOicVfPouBfsldtHjetiwXThcE+lowFmWePbB2gT6BzJ\njnoDnNg0Y3RzGwv9hhV77qTQcMzd8lrryEKAb8z1uXkMkNPISQwsih2/dIoP\nCyHv01zOjGCguZxsLGb5/JFGiBpHMiSycKSnsm7+FprfB6zwpYV1FtoqDtZ6\nbKKFfSaYN8aOyd5Pw1fy9+RRZiBZLj3wo0HCPTVm4MqusxqEuiwQV9i1NSBF\nD94jTymXfbBACtdgg44/z2US/IogGex1cOX7YGPqJwv8Odn7bGGZFngeLdDH\nLeu1Am9maGTWu7W2eCKOll19KonxxPjUQ2We1/5ogCb0/OiwQEvG5jlFfhoo\nm00ykHyrSha45u2iBB4twMj3NY7qUGO95cNuOjgXqbAf71IjiVDCNo5g0m+b\nn3vNcg8Vfx7hI1lb/Ldguwr5iuQWxquQz4OLj1adXqpAvjcs/L47os8N1k3j\nlGeh9rx5Y3mGnNfTl4VQtZSEyFDPbU8uRv+YIkW9NfGpaRWnXHmeiR+ywuYe\nTtdL0S+drVyBMvRThv7OzspmOfpNxKIfxXjRr3FcAp0UVn98onn1W4f5bDr6\n6rCeEs5mu7RCPzKet2QNEDbJEXI43uTT4/+REvpzg+qzw9vzcigwBSk7W6+4\nI+bYDOwdwnw/CkirYIOUVoqvd4kC8g1dY28VUMhvFKG15TaF/M8OTvrtlEuh\nPoG9ax+vrPJA/dpVlR0h3RNR34H67od3M9Wo/07/pnsJfSr4Yrnh5UTylt7Y\nX+A0VQnzP9v7TCD+ieYCTivAgaDpgxpIvuw6UG9Wov80g/0p71ao0J/VkNl6\nv0WN/hWx6G8x/lCtx7mkDq1QjxIiuYFbrYOqmUuWn/+rANmLhp8RbUOY97Ee\nsW2+g/VQ8+XIdNZFifMm1m/zba4Bwl4qtq75phJ8RkNdgk/61XQ1zrPIjzjv\nDTnP3rwj/In3gciveF+I/GdLuQKNqA91LimuMMGI+j0n3XvnGFHfW0fJoJ0Y\nwrY5AwaxzVePGPQP72uW15H4i+eD5e9DqxaeEpduN5rQn7b85P4U/fv/ffwP\nllVkVA==\n " + ] + } + ] + }, + { + FaceForm[ + {RGBColor[0.50196, 0.56078, 0.59216], Opacity[1.]} + ], + FilledCurveBox[ + { + {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, + {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}} + }, + CompressedData[ + "\n1:eJxTTMoPSmVmYGBgAmJeKP1ERPbk0//KDqcXum77vFfF4Z/zr7evDyjB+eu2\nJdXf3KvosOKYt3nnQVU4v3d6nlAzgzqc//SC0u2fdhpw/Ye/asT0O2k6wMyH\n8SHqVOF8CK0G1w/jw8yH8WH2w/TD3Ifufhi/OGPi25r/Wg7TNvEUrjmtCOcX\nrum+ncGg4OCXJBBhaaIJ58Psg/HtTeN2eZ5Rgevv2ZnN+ZNBGW4+jA8xRw3O\nh9ijDtcP48PMh/Fh9sP0w9yH7n4AybfA1A==\n " + ] + ] + } + }, + AspectRatio -> Automatic, + BaselinePosition -> Scaled[0.288], + ImageSize -> {{21., 21.}, {21., 21.}}, + PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}} + ] + ]) + } + ], Cell[ StyleData["ChatExcludedWidget"], TemplateBoxOptions -> { @@ -3869,6 +4066,161 @@ Notebook[ ]) } ], + Cell[ + StyleData["ChatSystemMenu"], + TemplateBoxOptions -> { + DisplayFunction -> + (Function[ + GraphicsBox[ + { + Thickness[0.05], + { + FaceForm[ + {RGBColor[0.50196, 0.56078, 0.59216], Opacity[1.]} + ], + FilledCurveBox[ + { + { + {1, 4, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0} + } + }, + CompressedData[ + "\n1:eJxTTMoPSmVmYGBgBGIRIGZigAFDBwht4ADjR6VY3/fvNYDTuNTJvH5kJsUg\nAOdnbH5VvHUqN5xvee1orgkDB9wcGB9mDipfBs6fkSfUfOCUJJp5Emj2wfgS\nOPgwc1Xg8qjul0DzH0ze0KHW3jRu10lJOP/pBaXbP/9JY4QDAHoEQIQ=\n " + ] + ] + }, + { + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], + FilledCurveBox[ + { + { + {0, 2, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0} + }, + { + {0, 2, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3}, + {0, 1, 0}, + {0, 1, 0}, + {0, 1, 0}, + {1, 3, 3}, + {1, 3, 3}, + {0, 1, 0}, + {1, 3, 3} + } + }, + { + CompressedData[ + "\n1:eJxTTMoPSmViYGBQBGIQfftnXdYeE22H1teBO+RYVR2eXlACCmk5RJwyOrLR\nT9mBT3fT3PfPNRz08xYz7lmq7OCUAFQRre5wlTNDKUdCyaE75/nvlRvVHf6l\nfn+S2KjgwLFGJirlt6qD1krhCy4z5B14mLTbxSRVHXgmr2wK1FR0uBb2Rn/3\ncyU431e0x+sVixJcvc3eoGmKfgpw84QTD1/WXqoAt6/oJ//L7fpycPfcf8A9\neSWTNNy9n/uCS1SmS8L985AbZJGMQ+NUZ6BTEXyIuzTg6iHu1oCbJ8kSBvS6\nFty+89+DHy+N1oK7Z84RhQ1FL7Th7oWEmy7cPxkT39bYm+rB/Ztifd+/97oO\nPDxgfFh4wdTDwhNmHiy8IfGgDbVXA+4eWHzB3AuLT5h/IPZowv0L48PCAz3+\nAcYL3Ok=\n " + ], + CompressedData[ + "\n1:eJxdVAlME1EQrQh4REUJtIUesqUt3e62lQQQT4aggifhEMUDFTUhBsQgRELU\ncEQBCwoRBbwFCTF4n3hEiSIeGKIGATVeoAFFQBRRg0T/dneHxE22m/c7/8/M\ne28+FZsYvt5OIpEsIy/3Da9W7+gMY2Ei+a2O0YPLmeD3aUUMHCglz4shnLEv\nyBrv5QVvQ/OLN4azkOicVfPouBfsldtHjetiwXThcE+lowFmWePbB2gT6BzJ\njnoDnNg0Y3RzGwv9hhV77qTQcMzd8lrryEKAb8z1uXkMkNPISQwsih2/dIoP\nCyHv01zOjGCguZxsLGb5/JFGiBpHMiSycKSnsm7+FprfB6zwpYV1FtoqDtZ6\nbKKFfSaYN8aOyd5Pw1fy9+RRZiBZLj3wo0HCPTVm4MqusxqEuiwQV9i1NSBF\nD94jTymXfbBACtdgg44/z2US/IogGex1cOX7YGPqJwv8Odn7bGGZFngeLdDH\nLeu1Am9maGTWu7W2eCKOll19KonxxPjUQ2We1/5ogCb0/OiwQEvG5jlFfhoo\nm00ykHyrSha45u2iBB4twMj3NY7qUGO95cNuOjgXqbAf71IjiVDCNo5g0m+b\nn3vNcg8Vfx7hI1lb/Ldguwr5iuQWxquQz4OLj1adXqpAvjcs/L47os8N1k3j\nlGeh9rx5Y3mGnNfTl4VQtZSEyFDPbU8uRv+YIkW9NfGpaRWnXHmeiR+ywuYe\nTtdL0S+drVyBMvRThv7OzspmOfpNxKIfxXjRr3FcAp0UVn98onn1W4f5bDr6\n6rCeEs5mu7RCPzKet2QNEDbJEXI43uTT4/+REvpzg+qzw9vzcigwBSk7W6+4\nI+bYDOwdwnw/CkirYIOUVoqvd4kC8g1dY28VUMhvFKG15TaF/M8OTvrtlEuh\nPoG9ax+vrPJA/dpVlR0h3RNR34H67od3M9Wo/07/pnsJfSr4Yrnh5UTylt7Y\nX+A0VQnzP9v7TCD+ieYCTivAgaDpgxpIvuw6UG9Wov80g/0p71ao0J/VkNl6\nv0WN/hWx6G8x/lCtx7mkDq1QjxIiuYFbrYOqmUuWn/+rANmLhp8RbUOY97Ee\nsW2+g/VQ8+XIdNZFifMm1m/zba4Bwl4qtq75phJ8RkNdgk/61XQ1zrPIjzjv\nDTnP3rwj/In3gciveF+I/GdLuQKNqA91LimuMMGI+j0n3XvnGFHfW0fJoJ0Y\nwrY5AwaxzVePGPQP72uW15H4i+eD5e9DqxaeEpduN5rQn7b85P4U/fv/ffwP\nllVkVA==\n " + ] + } + ] + }, + { + FaceForm[{RGBColor[1., 1., 1.], Opacity[1.]}], + FilledCurveBox[ + { + {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, + {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}} + }, + CompressedData[ + "\n1:eJxTTMoPSmVmYGBgAmJeKP1ERPbk0//KDqcXum77vFfF4Z/zr7evDyjB+eu2\nJdXf3KvosOKYt3nnQVU4v3d6nlAzgzqc//SC0u2fdhpw/Ye/asT0O2k6wMyH\n8SHqVOF8CK0G1w/jw8yH8WH2w/TD3Ifufhi/OGPi25r/Wg7TNvEUrjmtCOcX\nrum+ncGg4OCXJBBhaaIJ58Psg/HtTeN2eZ5Rgevv2ZnN+ZNBGW4+jA8xRw3O\nh9ijDtcP48PMh/Fh9sP0w9yH7n4AybfA1A==\n " + ] + ] + } + }, + AspectRatio -> Automatic, + ImageSize -> {{21., 21.}, {21., 21.}}, + PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}} + ] + ]) + } + ], Cell[ StyleData["ChatUserIcon"], TemplateBoxOptions -> { diff --git a/Source/Chatbook/Actions.wl b/Source/Chatbook/Actions.wl index 87caab6b..c1b9c2ce 100644 --- a/Source/Chatbook/Actions.wl +++ b/Source/Chatbook/Actions.wl @@ -39,6 +39,7 @@ ChatbookAction[ "CopyChatObject" , args___ ] := catchMine @ CopyChatObject ChatbookAction[ "DisableAssistance" , args___ ] := catchMine @ DisableAssistance @ args; ChatbookAction[ "EvaluateChatInput" , args___ ] := catchMine @ EvaluateChatInput @ args; ChatbookAction[ "ExclusionToggle" , args___ ] := catchMine @ ExclusionToggle @ args; +ChatbookAction[ "OpenChatBlockSettings", args___ ] := catchMine @ OpenChatBlockSettings @ args; ChatbookAction[ "OpenChatMenu" , args___ ] := catchMine @ OpenChatMenu @ args; ChatbookAction[ "PersonaManage" , args___ ] := catchMine @ PersonaManage @ args; (* ChatbookAction[ "PersonaURLInstall" , args___ ] := catchMine @ PersonaURLInstall @ args; *) (* TODO *) @@ -314,6 +315,13 @@ constructChatObject // endDefinition; chatObject := chatObject = Symbol[ "System`ChatObject" ]; +(* ::**************************************************************************************************************:: *) +(* ::Section::Closed:: *) +(*OpenChatBlockSettings*) +OpenChatBlockSettings // beginDefinition; +OpenChatBlockSettings[ cell_CellObject ] := OpenChatMenu[ "ChatSection", cell ]; +OpenChatBlockSettings // endDefinition; + (* ::**************************************************************************************************************:: *) (* ::Section::Closed:: *) (*OpenChatMenu*) diff --git a/Source/Chatbook/UI.wl b/Source/Chatbook/UI.wl index 447dbac0..290f4e23 100644 --- a/Source/Chatbook/UI.wl +++ b/Source/Chatbook/UI.wl @@ -1878,6 +1878,12 @@ makeChatDelimiterActionMenuContent[ personas ], { + Delimiter, + { + alignedMenuIcon[getIcon["ChatBlockSettingsMenuIcon"]], + "Chat Block Settings\[Ellipsis]", + "OpenChatBlockSettings" + }, Delimiter, {alignedMenuIcon[getIcon["PersonaOther"]], "Add & Manage Personas\[Ellipsis]", "PersonaManage"}, {alignedMenuIcon[getIcon["PersonaFromURL"]], "Install From URL\[Ellipsis]", "PersonaURLInstall"}, From dbffce5082eb765d3d51b1a77e9593c31a06cb41 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 15:09:07 -0400 Subject: [PATCH 11/14] Bump version --- PacletInfo.wl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PacletInfo.wl b/PacletInfo.wl index 553a5c45..02af72f8 100644 --- a/PacletInfo.wl +++ b/PacletInfo.wl @@ -1,7 +1,7 @@ PacletObject[<| "Name" -> "Wolfram/Chatbook", "PublisherID" -> "Wolfram", - "Version" -> "0.0.14", + "Version" -> "0.0.15", "WolframVersion" -> "13.2+", "Description" -> "Wolfram Notebooks + LLMs", "License" -> "MIT", From 00b9891f77672747a208e83e7df58c143bc9f6f0 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 15:23:33 -0400 Subject: [PATCH 12/14] Bugfix: ensure `$cloudNotebooks` is on context path in subpackages --- Source/Chatbook/CreateChatNotebook.wl | 1 + Source/Chatbook/UI.wl | 1 + 2 files changed, 2 insertions(+) diff --git a/Source/Chatbook/CreateChatNotebook.wl b/Source/Chatbook/CreateChatNotebook.wl index 31ca0486..9cf4f3e5 100644 --- a/Source/Chatbook/CreateChatNotebook.wl +++ b/Source/Chatbook/CreateChatNotebook.wl @@ -9,6 +9,7 @@ ClearAll[ "`Private`*" ]; Begin[ "`Private`" ]; Needs[ "Wolfram`Chatbook`" ]; +Needs[ "Wolfram`Chatbook`Common`" ]; Needs[ "Wolfram`Chatbook`ErrorUtils`" ]; (* ::**************************************************************************************************************:: *) diff --git a/Source/Chatbook/UI.wl b/Source/Chatbook/UI.wl index 290f4e23..c39509bc 100644 --- a/Source/Chatbook/UI.wl +++ b/Source/Chatbook/UI.wl @@ -28,6 +28,7 @@ GetChatInputLLMConfigurationSelectorMenuData Begin["`Private`"] Needs["Wolfram`Chatbook`"] +Needs["Wolfram`Chatbook`Common`"] Needs["Wolfram`Chatbook`ErrorUtils`"] Needs["Wolfram`Chatbook`Errors`"] Needs["Wolfram`Chatbook`Debug`"] From 4ab64c285d86c3afee6e5e6ff31c30b1b7cdfd2d Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 15:55:42 -0400 Subject: [PATCH 13/14] Bugfix: fixed broken definition for `activeAIAssistantCell` in cloud notebooks --- Source/Chatbook/Actions.wl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Chatbook/Actions.wl b/Source/Chatbook/Actions.wl index c1b9c2ce..7dc07d30 100644 --- a/Source/Chatbook/Actions.wl +++ b/Source/Chatbook/Actions.wl @@ -723,7 +723,10 @@ sendChat[ evalCell_, nbo_, settings0_ ] := catchTopAs[ ChatbookAction ] @ Enclos container = ProgressIndicator[ Appearance -> "Percolate" ]; $reformattedCell = None; - cell = activeAIAssistantCell[ container, Association[ settings, "Container" :> container ] ]; + cell = activeAIAssistantCell[ + container, + Association[ settings, "Container" :> container, "CellObject" :> cellObject, "Task" :> task ] + ]; Quiet[ TaskRemove @ $lastTask; From 14112db5da5b069c6254bc03921cefa4c8730430 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Mon, 22 May 2023 16:05:03 -0400 Subject: [PATCH 14/14] Submitted to paclet repo --- ResourceDefinition.nb | 252 ++++++++++++++++++++++++------------------ 1 file changed, 146 insertions(+), 106 deletions(-) diff --git a/ResourceDefinition.nb b/ResourceDefinition.nb index 721a4261..d8c77344 100644 --- a/ResourceDefinition.nb +++ b/ResourceDefinition.nb @@ -1553,6 +1553,63 @@ Notebook[ CellTags -> {"FileManagerCell", "FileManager-PacletFiles"}, CellID -> 2000352945 ], + Cell[ + BoxData[ + InterpretationBox[ + TagBox[ + TemplateBox[ + { + "\"ChatBlockSettingsMenuIcon.wl\"", + FileNameJoin[ + { + NotebookDirectory[], + "Developer", + "Resources", + "Icons", + "ChatBlockSettingsMenuIcon.wl" + } + ] + }, + "FileManagerFileOpenerTemplate" + ], + Function[ + Annotation[ + #1, + DefinitionNotebookClient`TemplateCells`PackagePrivate`fileDepth[ + 3 + ] + ] + ] + ], + FileNameJoin[ + { + NotebookDirectory[], + "Developer", + "Resources", + "Icons", + "ChatBlockSettingsMenuIcon.wl" + } + ], + BoxID -> "FileTreePath", + BaseStyle -> {"Text"} + ] + ], + "FileManagerFile", + CellMargins -> {{69 + Inherited, Inherited}, {Inherited, Inherited}}, + CellGroupingRules -> {"SectionGrouping", 130}, + CellFrameLabels -> { + { + Cell[ + BoxData[TemplateBox[{}, "FileManagerWLIconTemplate"]], + Background -> None + ], + Inherited + }, + {Inherited, Inherited} + }, + CellTags -> {"FileManagerCell", "FileManager-PacletFiles"}, + CellID -> 840082979 + ], Cell[ BoxData[ InterpretationBox[ @@ -1895,6 +1952,63 @@ Notebook[ CellTags -> {"FileManagerCell", "FileManager-PacletFiles"}, CellID -> 1306351818 ], + Cell[ + BoxData[ + InterpretationBox[ + TagBox[ + TemplateBox[ + { + "\"ChatSystemMenu.wl\"", + FileNameJoin[ + { + NotebookDirectory[], + "Developer", + "Resources", + "Icons", + "ChatSystemMenu.wl" + } + ] + }, + "FileManagerFileOpenerTemplate" + ], + Function[ + Annotation[ + #1, + DefinitionNotebookClient`TemplateCells`PackagePrivate`fileDepth[ + 3 + ] + ] + ] + ], + FileNameJoin[ + { + NotebookDirectory[], + "Developer", + "Resources", + "Icons", + "ChatSystemMenu.wl" + } + ], + BoxID -> "FileTreePath", + BaseStyle -> {"Text"} + ] + ], + "FileManagerFile", + CellMargins -> {{69 + Inherited, Inherited}, {Inherited, Inherited}}, + CellGroupingRules -> {"SectionGrouping", 130}, + CellFrameLabels -> { + { + Cell[ + BoxData[TemplateBox[{}, "FileManagerWLIconTemplate"]], + Background -> None + ], + Inherited + }, + {Inherited, Inherited} + }, + CellTags -> {"FileManagerCell", "FileManager-PacletFiles"}, + CellID -> 770999598 + ], Cell[ BoxData[ InterpretationBox[ @@ -6398,7 +6512,7 @@ Notebook[ {Inherited, Inherited} }, CellTags -> {"FileManagerCell", "FileManager-PacletFiles"}, - CellID -> 222793628 + CellID -> 429889803 ] }, Closed @@ -7190,9 +7304,14 @@ Notebook[ TagBox[ TemplateBox[ { - "\"Streaming.wl\"", + "\"ServerSentEventUtils.wl\"", FileNameJoin[ - {NotebookDirectory[], "Source", "Chatbook", "Streaming.wl"} + { + NotebookDirectory[], + "Source", + "Chatbook", + "ServerSentEventUtils.wl" + } ] }, "FileManagerFileOpenerTemplate" @@ -7207,7 +7326,12 @@ Notebook[ ] ], FileNameJoin[ - {NotebookDirectory[], "Source", "Chatbook", "Streaming.wl"} + { + NotebookDirectory[], + "Source", + "Chatbook", + "ServerSentEventUtils.wl" + } ], BoxID -> "FileTreePath", BaseStyle -> {"Text"} @@ -7227,7 +7351,7 @@ Notebook[ {Inherited, Inherited} }, CellTags -> {"FileManagerCell", "FileManager-PacletFiles"}, - CellID -> 297017234 + CellID -> 712963170 ], Cell[ BoxData[ @@ -7235,9 +7359,9 @@ Notebook[ TagBox[ TemplateBox[ { - "\"UI.wl\"", + "\"Streaming.wl\"", FileNameJoin[ - {NotebookDirectory[], "Source", "Chatbook", "UI.wl"} + {NotebookDirectory[], "Source", "Chatbook", "Streaming.wl"} ] }, "FileManagerFileOpenerTemplate" @@ -7252,7 +7376,7 @@ Notebook[ ] ], FileNameJoin[ - {NotebookDirectory[], "Source", "Chatbook", "UI.wl"} + {NotebookDirectory[], "Source", "Chatbook", "Streaming.wl"} ], BoxID -> "FileTreePath", BaseStyle -> {"Text"} @@ -7272,7 +7396,7 @@ Notebook[ {Inherited, Inherited} }, CellTags -> {"FileManagerCell", "FileManager-PacletFiles"}, - CellID -> 1216656210 + CellID -> 297017234 ], Cell[ BoxData[ @@ -7280,9 +7404,9 @@ Notebook[ TagBox[ TemplateBox[ { - "\"Utils.wl\"", + "\"UI.wl\"", FileNameJoin[ - {NotebookDirectory[], "Source", "Chatbook", "Utils.wl"} + {NotebookDirectory[], "Source", "Chatbook", "UI.wl"} ] }, "FileManagerFileOpenerTemplate" @@ -7297,7 +7421,7 @@ Notebook[ ] ], FileNameJoin[ - {NotebookDirectory[], "Source", "Chatbook", "Utils.wl"} + {NotebookDirectory[], "Source", "Chatbook", "UI.wl"} ], BoxID -> "FileTreePath", BaseStyle -> {"Text"} @@ -7317,81 +7441,7 @@ Notebook[ {Inherited, Inherited} }, CellTags -> {"FileManagerCell", "FileManager-PacletFiles"}, - CellID -> 1634736 - ] - }, - Closed - ] - ], - Cell[ - CellGroupData[ - { - Cell[ - TextData[ - Cell[ - BoxData[ - InterpretationBox[ - TagBox[ - ActionMenuBox[ - "\"ServerSentEventUtils\"", - { - "\"Open/Close Group\"" :> - (SelectionMove[ParentCell[EvaluationCell[]], All, Cell]; - FrontEndTokenExecute[ - EvaluationNotebook[], - "OpenCloseGroup" - ]), - "\"Open Directory\"" :> - DefinitionNotebookClient`FileTreeOpen[ - ParentCell[EvaluationCell[]] - ], - "\"Un/Mark as Excluded\"" :> - DefinitionNotebookClient`FileTreeExclusionToggle[ - ParentCell[EvaluationCell[]] - ], - "\"Copy Path to Clipboard\"" :> - DefinitionNotebookClient`FileTreeCopy[ - ParentCell[EvaluationCell[]] - ] - }, - Appearance -> None, - BaseStyle -> {"Text"} - ], - Function[ - Annotation[ - #1, - DefinitionNotebookClient`TemplateCells`PackagePrivate`fileDepth[ - 1 - ] - ] - ] - ], - FileNameJoin[ - {NotebookDirectory[], "Source", "ServerSentEventUtils"} - ], - BoxID -> "FileTreePath", - BaseStyle -> {"Text"} - ] - ] - ] - ], - "FileManagerDirectory", - CellMargins -> {{23 + Inherited, Inherited}, {Inherited, Inherited}}, - CellGroupingRules -> {"SectionGrouping", 110}, - CellFrameLabels -> { - { - Cell[ - BoxData[ - TemplateBox[{}, "FileManagerDirectoryIconTemplate"] - ], - Background -> None - ], - Inherited - }, - {Inherited, Inherited} - }, - CellTags -> {"FileManagerCell", "FileManager-PacletFiles"}, - CellID -> 1705204188 + CellID -> 1216656210 ], Cell[ BoxData[ @@ -7399,14 +7449,9 @@ Notebook[ TagBox[ TemplateBox[ { - "\"ServerSentEventUtils.wl\"", + "\"Utils.wl\"", FileNameJoin[ - { - NotebookDirectory[], - "Source", - "ServerSentEventUtils", - "ServerSentEventUtils.wl" - } + {NotebookDirectory[], "Source", "Chatbook", "Utils.wl"} ] }, "FileManagerFileOpenerTemplate" @@ -7421,12 +7466,7 @@ Notebook[ ] ], FileNameJoin[ - { - NotebookDirectory[], - "Source", - "ServerSentEventUtils", - "ServerSentEventUtils.wl" - } + {NotebookDirectory[], "Source", "Chatbook", "Utils.wl"} ], BoxID -> "FileTreePath", BaseStyle -> {"Text"} @@ -7446,7 +7486,7 @@ Notebook[ {Inherited, Inherited} }, CellTags -> {"FileManagerCell", "FileManager-PacletFiles"}, - CellID -> 1197518501 + CellID -> 1634736 ] }, Closed @@ -8782,7 +8822,7 @@ Notebook[ "Code", "Excluded", InitializationCell -> True, - CellLabel -> "In[2]:=", + CellLabel -> "In[7]:=", CellID -> 996717066 ], Cell[ @@ -8844,7 +8884,7 @@ Notebook[ ], "Code", "Excluded", - CellLabel -> "In[4]:=", + CellLabel -> "In[9]:=", CellID -> 23056019 ], Cell[ @@ -8899,7 +8939,7 @@ Notebook[ "Code", "Excluded", InitializationCell -> True, - CellLabel -> "In[5]:=", + CellLabel -> "In[10]:=", CellID -> 29801418 ] }, @@ -13313,8 +13353,8 @@ Notebook[ "StatusMessage" -> "", "AutoUpdate" -> True, "PacletBuildData" -> { - "LastBuiltArchive" -> "H:\\Documents\\Chatbook\\build\\Wolfram__Chatbook-0.0.12.paclet", - "FileHashes" -> ByteArray["OEM6eJyNlmtsFFUUgH1UtDTE4qu0xbICtUXcXSsF02gJ+6IubmHbKa0GqZmdvbu9MHtnvXO3dLvUFMGIpVhDGjWQSH/4Q+kPqiloiE1NtGp8BAxgYqxGVESNUYNGI5ji7Ha3Z7h3+vixk50vc76cc+7TtdIu2V26jpjudPmNP1hnMmFOV9D/CEp6saxqUS/SFYrjDGvEsUN1XWeX5klagiooMHzigc6qu5vuM0iTTKOImYjDwuppk5lHIwx1sEm1O8GYRnROO3TltbzxZxx20AKpnovWg1RVb0KxuCozxMnrtsfn72hO1oEciFUnBLnEkiriU/6n/3H178sPzQMrkHILa5BqsbjBvCgiJ1TmiIXNtuiy8rf2P9vfBTYgK2aw1SGCKFaMd8QZ3bf8mJ9Sy6JgBFKYNfqVzFB0RMyBPvu+sZqCDW0QCMS2nhqN8ZGwM9MTqQ2lNemGhTRtu4OEzKI3k290TiyUykAEZGUgUG/0OIKjCSqn55kziKiuEVl3ujENE5mGtUx6XNf3DX3/0q7UV1vBCWROzqCm873vU4sLfE3jNeAEcs+cnELz3317yaEG38eNoASyenpldm44+S+4Jny95Y4FVwp328AOpHJ6+8NIjSNq1dW8wRsa1nxwNgRCIBWzCsXyb/xz/+CLNT0p8AG5f3rfRo2g2Wo/+d/8osKjXT5QA5mh9hZNjWBkVfuX+XnFx55bGgAhkNmFFtNp9NFa96Uz6zpBCGSGZuaEQjPbx17YcuGk7gEfkAVBWVER85OIxpXV3TtY0/ovjkMUkIWTUfUywRFk5H9VpJ6XHgYIO9jQfPzIZ+5Ku3TX5AdTy925ptqNGaz+WIc5gXdeUUeXlgwUgAlICW9yKelm8FvscJ+36qlh+oTpsJkipbxiKo2rHafv/bwsf+/p1eAAUiw4tFhMXG2+672lR2+62bTapki5YKDIOIDSrxs1hizyGew5oRd8c7gSbEAW8TYvCiWinODi+8eHmnd9VAQCIEJBPko1yrdVue1i8aXfozvBAOROS8NmhlXe8mDvqXXKtvOmaQ5EsKzXaExmDBO+mm8rej988po9LrAAEYY4d/hwDk/jpyOHN/xlqgfIMt7hJyomqBFFEEVEEU712p8u7B54rygCLiBFvKtexvxkObUifGD0/NOmeoAIw1uPSIJPIIWPjCweqzDNeSBCMdnNw0+MS4GqIsq5Js4VtvR5N5WAC4jQ3NxGxDn2bPqtXUkmNXAAWSw4MrcScZQnAr/+0d213HS9A2LjJZJxoZFV3Gm1+9+69tDa/lVfmCoCImQjMWMxxsRszkV/eXlJT3UFSIDczks2+7no0HevXlv++tlWiAYijLDVwvkkNb715x8OloIAyKqswOhBO6ISMqZ7u/HIaCwh5z4zcGzkwOXWbeAGsjznZjJlibjTjaKYTD6ziJMtqmoZ6fN2Y5ABsXGy9JXQ+FmLdj72fEetrVYCUY78D7gEpXE="] + "LastBuiltArchive" -> "H:\\Documents\\Chatbook\\build\\Wolfram__Chatbook-0.0.15.paclet", + "FileHashes" -> ByteArray["OEM6eJyNlm9sE2Ucx41WZJiFQoAxyqDIxmDS1smYLLq4di1bYwdlNxgEkdxuT4+D+1Oee7q1a5cwxqKiOKOgRt+Q+EadCTMBFcMiLwYSjcFlqAgjBv9GNM5Mo2YY8Lq1+x3Pc/vzopfeJ/d88vy+z++ee7xrXZzLq+uI6B5v0Pgj6YRXiccbDj6BEn6JlzXRj3QBS1Eiaaq7Vfbe7eJmcVoMCyh08qNH2kpXNTxkkAYei4iYiNvCWr2HJ9WaSlCcjKt9MUI0Vae0vbffsg11uV2gBVI2E201kmW9ASlRmSeIktfsi85p3ZaoATkQqyQYOUcSMqKn/M/RJ+W/bz42C6xAiiysYawpUYP5UYSPycStNJtt4sqiD448fbQdbEDWTGGrQSrCkmDcI8rom/9TTlJeJoIRiD1jDApjSxGPmAcWnp7Xn6pakwsDgTg3YiOYgNrsGcuE24PSmnRgTZq2z602mUXC3K9afz1z9XEQAXkwFKozMo5IYgzz6T7zhBHWNZXXPT4JN6s8btbGpkel/lzv9692JK/uAieQGTnDmk5n3y3n3x9oGKoAJ5CSGTmZ8M9+uPyNLYFP60EJZP3kykxveOgnqBCu7VyUe9ve6QQ7kNWT22uRHEXYKlVbz71bys9/2QRCIMXTCtny7/vzSM8rFYeT4APy8OS+TZqKpqv94n9z8uwn2gOgBjJF7Y2aHJGQVe3f5NjyTz37QAiEQKYXWrTTx9srfaOXqtpACGSKMLNCJsyWcy/u/PmiXg0+ILlhXpARCaoRjSrriuI4aZs7aNpRgcwbH1XHq1IEGfO/Y6RuSy8DDDsxVHCs8+17sItbMf7AxOvuKS/zSQTefiVunkBwYODgBaVnA5iALKFNXiEdBr3FOnK++6R2dMN+UABx0IqJadzpGFw7sCznmcH14ACSzzg0RWEaZP+3q/tTtpECMAApYgwYGR+g9O0mjSCL+Vw+5O6/cW13LdiALKZtftQUEynBSP/7vds6LuSBAAhTUABjDdOxCgtG8keHxZRpX54gBZaGrUSSacujz39RJez90dTmQBjLRg0rPCGSSlfDv/xe1/C6y+VgAcIscfbjQzm6En8dX8ENmDZbICtpR1CVJRXVowjCSBWYr3pN6RXvwuG7tpvOChMkj3bV8RLdLAcdqdmf29+cDeOBMMtbh9QYPYGk9E7f0nPFu0EAhCkms3kEVeNQIMsIU65b1+2N3f7NS8AFhAk3uxFRjkObf28REgkNHECWMo6xUwm7yrdCv/1xoL3QtBkBcdISzjjQ8LLUZrX7n343flb3+1aBCEixhagFYQ4ZPdNiXKyaeMeCzq87/GcWgQ8IUx1HjJdbYau7Lt54bfnhsmKQAFlIS7YGqdHnR6T6in9LSmA0EKZjrGr4LDm065cfXneAAMi6jMAqipnkc+n4qb6Xbj61F9xACrNuwmMSi3p8SJTU8WsGUbLFpY193f4DEsiAOClZ+ohp/KxFqR0vxCudlRyIsuR/uu3E+Q=="] } }, CreateCellID -> True,