From 60ea05001501f1f9cca2daad6c01a4ecc2d5a357 Mon Sep 17 00:00:00 2001 From: Kevin Daily Date: Wed, 20 Nov 2024 12:37:12 -0800 Subject: [PATCH 1/9] Add string resources for NA output raft copy-as action menu --- FrontEnd/TextResources/ChatbookStrings.tr | 4 ++++ FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr | 4 ++++ FrontEnd/TextResources/French/ChatbookStrings.tr | 4 ++++ FrontEnd/TextResources/Japanese/ChatbookStrings.tr | 4 ++++ FrontEnd/TextResources/Korean/ChatbookStrings.tr | 4 ++++ FrontEnd/TextResources/Spanish/ChatbookStrings.tr | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/FrontEnd/TextResources/ChatbookStrings.tr b/FrontEnd/TextResources/ChatbookStrings.tr index 4bcb1838..399db9f1 100644 --- a/FrontEnd/TextResources/ChatbookStrings.tr +++ b/FrontEnd/TextResources/ChatbookStrings.tr @@ -211,6 +211,10 @@ "WorkspaceSourcesOpenNotebooks" -> "Open Notebooks", "WorkspaceOutputRaftCopyAsTooltip" -> "Copy response to clipboard\[Ellipsis]", +"WorkspaceOutputRaftCopyAs" -> "Copy response as\[Ellipsis]", +"WorkspaceOutputRaftCopyAsNotebookCells" -> "Notebook Cells", +"WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", +"WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", "WorkspaceOutputRaftFeedbackTooltip" -> "Send feedback to Wolfram", diff --git a/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr b/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr index e6c8c988..4e644a35 100644 --- a/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr +++ b/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr @@ -211,6 +211,10 @@ "WorkspaceSourcesOpenNotebooks" -> "\:958B\:555F\:7B46\:8A18\:672C", "WorkspaceOutputRaftCopyAsTooltip" -> "Copy response to clipboard\[Ellipsis]", +"WorkspaceOutputRaftCopyAs" -> "Copy response as\[Ellipsis]", +"WorkspaceOutputRaftCopyAsNotebookCells" -> "Notebook Cells", +"WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", +"WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", "WorkspaceOutputRaftFeedbackTooltip" -> "\:767C\:9001\:56DE\:994B\:81F3 Wolfram", diff --git a/FrontEnd/TextResources/French/ChatbookStrings.tr b/FrontEnd/TextResources/French/ChatbookStrings.tr index 704b789c..e408c94e 100644 --- a/FrontEnd/TextResources/French/ChatbookStrings.tr +++ b/FrontEnd/TextResources/French/ChatbookStrings.tr @@ -211,6 +211,10 @@ "WorkspaceSourcesOpenNotebooks" -> "Ouvrir les notebooks", "WorkspaceOutputRaftCopyAsTooltip" -> "Copy response to clipboard\[Ellipsis]", +"WorkspaceOutputRaftCopyAs" -> "Copy response as\[Ellipsis]", +"WorkspaceOutputRaftCopyAsNotebookCells" -> "Notebook Cells", +"WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", +"WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", "WorkspaceOutputRaftFeedbackTooltip" -> "Envoyer un commentaire \[AGrave] Wolfram", diff --git a/FrontEnd/TextResources/Japanese/ChatbookStrings.tr b/FrontEnd/TextResources/Japanese/ChatbookStrings.tr index a3203f23..fbfc1344 100644 --- a/FrontEnd/TextResources/Japanese/ChatbookStrings.tr +++ b/FrontEnd/TextResources/Japanese/ChatbookStrings.tr @@ -211,6 +211,10 @@ "WorkspaceSourcesOpenNotebooks" -> "\:30ce\:30fc\:30c8\:30d6\:30c3\:30af\:3092\:958b\:304f", "WorkspaceOutputRaftCopyAsTooltip" -> "Copy response to clipboard\[Ellipsis]", +"WorkspaceOutputRaftCopyAs" -> "Copy response as\[Ellipsis]", +"WorkspaceOutputRaftCopyAsNotebookCells" -> "Notebook Cells", +"WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", +"WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", "WorkspaceOutputRaftFeedbackTooltip" -> "\:30d5\:30a3\:30fc\:30c9\:30d0\:30c3\:30af\:3092Wolfram\:306b\:9001\:4fe1\:3059\:308b", diff --git a/FrontEnd/TextResources/Korean/ChatbookStrings.tr b/FrontEnd/TextResources/Korean/ChatbookStrings.tr index 7040ec2e..2151b422 100644 --- a/FrontEnd/TextResources/Korean/ChatbookStrings.tr +++ b/FrontEnd/TextResources/Korean/ChatbookStrings.tr @@ -212,6 +212,10 @@ "WorkspaceSourcesOpenNotebooks" -> "\:B178\:D2B8\:BD81 \:C5F4\:AE30", "WorkspaceOutputRaftCopyAsTooltip" -> "Copy response to clipboard\[Ellipsis]", +"WorkspaceOutputRaftCopyAs" -> "Copy response as\[Ellipsis]", +"WorkspaceOutputRaftCopyAsNotebookCells" -> "Notebook Cells", +"WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", +"WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", "WorkspaceOutputRaftFeedbackTooltip" -> "Wolfram\:C5D0 \:D53C\:B4DC\:BC31 \:BCF4\:B0B4\:AE30", diff --git a/FrontEnd/TextResources/Spanish/ChatbookStrings.tr b/FrontEnd/TextResources/Spanish/ChatbookStrings.tr index 258a16d3..16082261 100644 --- a/FrontEnd/TextResources/Spanish/ChatbookStrings.tr +++ b/FrontEnd/TextResources/Spanish/ChatbookStrings.tr @@ -211,6 +211,10 @@ "WorkspaceSourcesOpenNotebooks" -> "Abrir cuadernos", "WorkspaceOutputRaftCopyAsTooltip" -> "Copy response to clipboard\[Ellipsis]", +"WorkspaceOutputRaftCopyAs" -> "Copy response as\[Ellipsis]", +"WorkspaceOutputRaftCopyAsNotebookCells" -> "Notebook Cells", +"WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", +"WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", "WorkspaceOutputRaftFeedbackTooltip" -> "Enviar comentarios a Wolfram", From 65e573c7bd1fd2a8d44e29e4ad29694fee9d7980 Mon Sep 17 00:00:00 2001 From: Kevin Daily Date: Wed, 20 Nov 2024 13:58:46 -0800 Subject: [PATCH 2/9] Implement design for CopyAs action menu --- .../WorkspaceOutputRaftClipboardIcon.wl | 183 +----------------- FrontEnd/TextResources/ChatbookResources.tr | 130 ++++--------- Source/Chatbook/ChatModes/UI.wl | 101 ++++++++-- 3 files changed, 130 insertions(+), 284 deletions(-) diff --git a/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftClipboardIcon.wl b/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftClipboardIcon.wl index a3181a7d..fddfa580 100644 --- a/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftClipboardIcon.wl +++ b/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftClipboardIcon.wl @@ -1,7 +1,6 @@ (* ::Package:: *) -RawBoxes @ ToBoxes @ Mouseover[ - Framed[ +Function[Evaluate @ ToBoxes @ Graphics[ { Thickness[ 0.055556 ], @@ -116,7 +115,7 @@ RawBoxes @ ToBoxes @ Mouseover[ } ] }, - FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] + FaceForm @ # ], Style[ { @@ -125,7 +124,7 @@ RawBoxes @ ToBoxes @ Mouseover[ { { { 10.0, 9.0 }, { 2.0, 9.0 }, { 2.0, 10.0 }, { 10.0, 10.0 }, { 10.0, 9.0 } } } ] }, - FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] + FaceForm @ # ], Style[ { @@ -134,7 +133,7 @@ RawBoxes @ ToBoxes @ Mouseover[ { { { 10.0, 7.0 }, { 2.0, 7.0 }, { 2.0, 8.0 }, { 10.0, 8.0 }, { 10.0, 7.0 } } } ] }, - FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] + FaceForm @ # ], Style[ { @@ -143,7 +142,7 @@ RawBoxes @ ToBoxes @ Mouseover[ { { { 10.0, 5.0 }, { 2.0, 5.0 }, { 2.0, 6.0 }, { 10.0, 6.0 }, { 10.0, 5.0 } } } ] }, - FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] + FaceForm @ # ], Style[ { @@ -152,179 +151,11 @@ RawBoxes @ ToBoxes @ Mouseover[ { { { 10.0, 3.0 }, { 2.0, 3.0 }, { 2.0, 4.0 }, { 10.0, 4.0 }, { 10.0, 3.0 } } } ] }, - FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] + FaceForm @ # ] }, ImageSize -> { 19.0, 17.0 }, PlotRange -> { { -0.5, 18.5 }, { -0.5, 16.5 } }, AspectRatio -> Automatic - ], - Background -> GrayLevel[ 1 ], - RoundingRadius -> 3, - FrameMargins -> 3, - FrameStyle -> GrayLevel[ 1 ] - ], - Framed[ - Graphics[ - { - Thickness[ 0.055556 ], - Style[ - { - FilledCurve[ - { - { { 1, 4, 3 }, { 0, 1, 0 }, { 0, 1, 0 }, { 1, 3, 3 }, { 1, 3, 3 }, { 0, 1, 0 }, { 1, 3, 3 }, { 1, 3, 3 }, { 0, 1, 0 }, { 1, 3, 3 } }, - { - { 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, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } }, - { - { 1, 4, 3 }, - { 0, 1, 0 }, - { 1, 3, 3 }, - { 0, 1, 0 }, - { 0, 1, 0 }, - { 0, 1, 0 }, - { 0, 1, 0 }, - { 0, 1, 0 }, - { 1, 3, 3 }, - { 0, 1, 0 }, - { 1, 3, 3 }, - { 1, 3, 3 }, - { 0, 1, 0 }, - { 1, 3, 3 } - } - }, - { - { - { 17.853, 7.8531 }, - { 17.658, 8.0481 }, - { 17.341, 8.0481 }, - { 17.146, 7.8531 }, - { 15.499, 6.2071 }, - { 13.853, 7.8531 }, - { 13.658, 8.0481 }, - { 13.341, 8.0481 }, - { 13.146, 7.8531 }, - { 12.951, 7.6581 }, - { 12.951, 7.3411 }, - { 13.146, 7.1461 }, - { 15.146, 5.1461 }, - { 15.244, 5.0481 }, - { 15.372, 4.9991 }, - { 15.499, 4.9991 }, - { 15.627, 4.9991 }, - { 15.755, 5.0481 }, - { 15.853, 5.1461 }, - { 17.853, 7.1461 }, - { 18.048, 7.3411 }, - { 18.048, 7.6581 }, - { 17.853, 7.8531 } - }, - { - { 9.9995, 12.999 }, - { 10.999, 12.999 }, - { 10.999, 0.9991 }, - { 0.9995, 0.9991 }, - { 0.9995, 12.999 }, - { 1.9995, 12.999 }, - { 1.9995, 13.999 }, - { -0.00049973, 13.999 }, - { -0.00049973, 0.00010014 }, - { 11.999, 0.00010014 }, - { 11.999, 13.999 }, - { 9.9995, 13.999 }, - { 9.9995, 12.999 } - }, - { { 4.0015, 12.999 }, { 7.9995, 12.999 }, { 7.4995, 13.999 }, { 4.5015, 13.999 }, { 4.0015, 12.999 } }, - { - { 3.1505, 12.475 }, - { 2.9675, 12.769 }, - { 2.9505, 13.137 }, - { 3.1065, 13.447 }, - { 3.6065, 14.447 }, - { 3.7755, 14.786 }, - { 4.1225, 15.001 }, - { 4.5015, 14.999 }, - { 5.0005, 14.999 }, - { 5.0005, 15.999 }, - { 7.0005, 15.999 }, - { 7.0005, 14.999 }, - { 7.4985, 14.999 }, - { 7.8775, 15.001 }, - { 8.2245, 14.786 }, - { 8.3925, 14.447 }, - { 8.8935, 13.447 }, - { 9.1405, 12.952 }, - { 8.9405, 12.351 }, - { 8.4455, 12.105 }, - { 8.3075, 12.035 }, - { 8.1545, 11.999 }, - { 7.9995, 11.999 }, - { 4.0015, 11.999 }, - { 3.6545, 11.999 }, - { 3.3325, 12.179 }, - { 3.1505, 12.475 } - } - } - ] - }, - FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] - ], - Style[ - { - FilledCurve[ - { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } }, - { { { 10.0, 9.0 }, { 2.0, 9.0 }, { 2.0, 10.0 }, { 10.0, 10.0 }, { 10.0, 9.0 } } } - ] - }, - FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] - ], - Style[ - { - FilledCurve[ - { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } }, - { { { 10.0, 7.0 }, { 2.0, 7.0 }, { 2.0, 8.0 }, { 10.0, 8.0 }, { 10.0, 7.0 } } } - ] - }, - FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] - ], - Style[ - { - FilledCurve[ - { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } }, - { { { 10.0, 5.0 }, { 2.0, 5.0 }, { 2.0, 6.0 }, { 10.0, 6.0 }, { 10.0, 5.0 } } } - ] - }, - FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] - ], - Style[ - { - FilledCurve[ - { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } }, - { { { 10.0, 3.0 }, { 2.0, 3.0 }, { 2.0, 4.0 }, { 10.0, 4.0 }, { 10.0, 3.0 } } } - ] - }, - FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451, 1.0 ] - ] - }, - ImageSize -> { 19.0, 17.0 }, - PlotRange -> { { -0.5, 18.5 }, { -0.5, 16.5 } }, - AspectRatio -> Automatic - ], - Background -> RGBColor[ 0.85882, 0.92941, 0.96863 ], - RoundingRadius -> 3, - FrameMargins -> 3, - FrameStyle -> RGBColor[ 0.85882, 0.92941, 0.96863 ] - ] + ] ] \ No newline at end of file diff --git a/FrontEnd/TextResources/ChatbookResources.tr b/FrontEnd/TextResources/ChatbookResources.tr index c9f0cda6..d07a6a1a 100644 --- a/FrontEnd/TextResources/ChatbookResources.tr +++ b/FrontEnd/TextResources/ChatbookResources.tr @@ -5041,83 +5041,28 @@ r1E= FrameMargins->0, ImageSize->Automatic], -"WorkspaceOutputRaftClipboardIcon" -> PaneSelectorBox[{False-> - FrameBox[ - GraphicsBox[ - {Thickness[0.055556], - {FaceForm[{RGBColor[0.2, 0.51373, 0.67451], Opacity[1.]}], - FilledCurveBox[{{{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, - 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}, {{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, 2, - 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{1, 4, 3}, {0, 1, 0}, {1, 3, - 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, - 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, - 3}}}, {CompressedData[" -1:eJxTTMoPSmViYGAQB2IQ/a7G3jTulqHD5XsPuCdnyjvMOaKwoWiFoQPvA90J -CyQUHOa9X37MOxzB9zHvdExQRagvzpj4tua/nsNixj2sQlckHG7/rMvas0Ub -Lg9S/jRAG67f+r5/7/R1WnD+jDyh5gNeWnD1X/5eqXj5TNOh+2/q9ycL5eD8 -ySubAj1jZeHqvU+w286eKgPl60H5Ig4bikAO0nOQOhCt4Ggo4hBhueVE2T49 -Byag80T+C8PdC+NL699VYXPUh/MPf9WI6W/Sh+uH+Ecfbj4svGD2A3m7PHmM -4O6D8WHuRw9fABp3nHM= - "], {{9.9995, 12.999}, {10.999, 12.999}, {10.999, 0.9991}, {0.9995, - 0.9991}, {0.9995, 12.999}, {1.9995, 12.999}, {1.9995, - 13.999}, {-0.00049973, 13.999}, {-0.00049973, 0.00010014}, {11.999, - 0.00010014}, {11.999, 13.999}, {9.9995, 13.999}, {9.9995, 12.999}}, {{ - 4.0015, 12.999}, {7.9995, 12.999}, {7.4995, 13.999}, {4.5015, - 13.999}, {4.0015, 12.999}}, CompressedData[" -1:eJxTTMoPSmViYGCQBmIQ7ZckEGFpwulgDAKfNRxsua4vLtjL7lBrbxq3q1PT -YcuJsn3zZ7E7LJDSv6vipuWgbsixRuYWh8O++UCBJzA+D5Sv4wAxj8/hvn/v -9LxJuhDzagUcgDyhZgY9hxXHvM07GYUcijMmvq35rwsVF8HB14fyZXDwdR0i -LIEu/CcL5x/+qhHT3yQPty/3+e+VH4sU4O7RjOk/9PWEAty92z7/vVJxUhHu -Hz7dTXPfuys5NE517s55rglx70NFh4OnFrpu26zhkLWnZLLEEwWHb0BrDplC -w2uugkPQDrnW14IaDieBwSXlrwB1jzqUlofzIf4XgPOVb/+sy7LhhfPB7lvB -5XD+e/DjpdEaDujxAwCec7rY - "]}]}, - {FaceForm[{RGBColor[0.2, 0.51373, 0.67451], Opacity[1.]}], - FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., - 9.}, {2., 9.}, {2., 10.}, {10., 10.}, {10., 9.}}}]}, - {FaceForm[{RGBColor[0.2, 0.51373, 0.67451], Opacity[1.]}], - FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., - 7.}, {2., 7.}, {2., 8.}, {10., 8.}, {10., 7.}}}]}, - {FaceForm[{RGBColor[0.2, 0.51373, 0.67451], Opacity[1.]}], - FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., - 5.}, {2., 5.}, {2., 6.}, {10., 6.}, {10., 5.}}}]}, - {FaceForm[{RGBColor[0.2, 0.51373, 0.67451], Opacity[1.]}], - FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., - 3.}, {2., 3.}, {2., 4.}, {10., 4.}, {10., 3.}}}]}}, - AspectRatio->Automatic, - ImageSize->{19., 17.}, - PlotRange->{{-0.5, 18.5}, {-0.5, 16.5}}], - Background->GrayLevel[1], - FrameMargins->3, - FrameStyle->GrayLevel[1], - RoundingRadius->3, - StripOnInput->False], True-> - FrameBox[ - GraphicsBox[ - {Thickness[0.055556], - {FaceForm[{RGBColor[0.2, 0.51373, 0.67451], Opacity[1.]}], - FilledCurveBox[{{{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, - 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}, {{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, 2, - 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{1, 4, 3}, {0, 1, 0}, {1, 3, - 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, - 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, - 3}}}, {CompressedData[" +"WorkspaceOutputRaftClipboardIcon" -> (GraphicsBox[{ + Thickness[0.055556], + StyleBox[{ + FilledCurveBox[{{{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, { + 0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}, {{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, 2, 0}, {0, 1, + 0}, {0, 1, 0}, {0, 1, 0}}, {{1, 4, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, + 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, { + 1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}}, {CompressedData[" 1:eJxTTMoPSmViYGAQB2IQ/a7G3jTulqHD5XsPuCdnyjvMOaKwoWiFoQPvA90J CyQUHOa9X37MOxzB9zHvdExQRagvzpj4tua/nsNixj2sQlckHG7/rMvas0Ub Lg9S/jRAG67f+r5/7/R1WnD+jDyh5gNeWnD1X/5eqXj5TNOh+2/q9ycL5eD8 ySubAj1jZeHqvU+w286eKgPl60H5Ig4bikAO0nOQOhCt4Ggo4hBhueVE2T49 Byag80T+C8PdC+NL699VYXPUh/MPf9WI6W/Sh+uH+Ecfbj4svGD2A3m7PHmM 4O6D8WHuRw9fABp3nHM= - "], {{9.9995, 12.999}, {10.999, 12.999}, {10.999, 0.9991}, {0.9995, - 0.9991}, {0.9995, 12.999}, {1.9995, 12.999}, {1.9995, - 13.999}, {-0.00049973, 13.999}, {-0.00049973, 0.00010014}, {11.999, - 0.00010014}, {11.999, 13.999}, {9.9995, 13.999}, {9.9995, 12.999}}, {{ - 4.0015, 12.999}, {7.9995, 12.999}, {7.4995, 13.999}, {4.5015, - 13.999}, {4.0015, 12.999}}, CompressedData[" + "], {{9.9995, 12.999}, {10.999, 12.999}, {10.999, 0.9991}, {0.9995, + 0.9991}, {0.9995, 12.999}, {1.9995, 12.999}, {1.9995, + 13.999}, {-0.00049973, 13.999}, {-0.00049973, 0.00010014}, {11.999, + 0.00010014}, {11.999, 13.999}, {9.9995, 13.999}, {9.9995, 12.999}}, {{ + 4.0015, 12.999}, {7.9995, 12.999}, {7.4995, 13.999}, {4.5015, + 13.999}, {4.0015, 12.999}}, CompressedData[" 1:eJxTTMoPSmViYGCQBmIQ7ZckEGFpwulgDAKfNRxsua4vLtjL7lBrbxq3q1PT YcuJsn3zZ7E7LJDSv6vipuWgbsixRuYWh8O++UCBJzA+D5Sv4wAxj8/hvn/v 9LxJuhDzagUcgDyhZgY9hxXHvM07GYUcijMmvq35rwsVF8HB14fyZXDwdR0i @@ -5125,30 +5070,25 @@ LIEu/CcL5x/+qhHT3yQPty/3+e+VH4sU4O7RjOk/9PWEAty92z7/vVJxUhHu Hz7dTXPfuys5NE517s55rglx70NFh4OnFrpu26zhkLWnZLLEEwWHb0BrDplC w2uugkPQDrnW14IaDieBwSXlrwB1jzqUlofzIf4XgPOVb/+sy7LhhfPB7lvB 5XD+e/DjpdEaDujxAwCec7rY - "]}]}, - {FaceForm[{RGBColor[0.2, 0.51373, 0.67451], Opacity[1.]}], - FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., - 9.}, {2., 9.}, {2., 10.}, {10., 10.}, {10., 9.}}}]}, - {FaceForm[{RGBColor[0.2, 0.51373, 0.67451], Opacity[1.]}], - FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., - 7.}, {2., 7.}, {2., 8.}, {10., 8.}, {10., 7.}}}]}, - {FaceForm[{RGBColor[0.2, 0.51373, 0.67451], Opacity[1.]}], - FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., - 5.}, {2., 5.}, {2., 6.}, {10., 6.}, {10., 5.}}}]}, - {FaceForm[{RGBColor[0.2, 0.51373, 0.67451], Opacity[1.]}], - FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., - 3.}, {2., 3.}, {2., 4.}, {10., 4.}, {10., 3.}}}]}}, - AspectRatio->Automatic, - ImageSize->{19., 17.}, - PlotRange->{{-0.5, 18.5}, {-0.5, 16.5}}], - Background->RGBColor[0.85882, 0.92941, 0.96863], - FrameMargins->3, - FrameStyle->RGBColor[0.85882, 0.92941, 0.96863], - RoundingRadius->3, - StripOnInput->False]}, Dynamic[ - CurrentValue["MouseOver"]], - FrameMargins->0, - ImageSize->Automatic], + "]}]}, { + FaceForm[#]}, StripOnInput -> False], + StyleBox[{ + FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., + 9.}, {2., 9.}, {2., 10.}, {10., 10.}, {10., 9.}}}]}, { + FaceForm[#]}, StripOnInput -> False], + StyleBox[{ + FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., + 7.}, {2., 7.}, {2., 8.}, {10., 8.}, {10., 7.}}}]}, { + FaceForm[#]}, StripOnInput -> False], + StyleBox[{ + FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., + 5.}, {2., 5.}, {2., 6.}, {10., 6.}, {10., 5.}}}]}, { + FaceForm[#]}, StripOnInput -> False], + StyleBox[{ + FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{10., + 3.}, {2., 3.}, {2., 4.}, {10., 4.}, {10., 3.}}}]}, { + FaceForm[#]}, StripOnInput -> False]}, ImageSize -> {19., 17.}, + PlotRange -> {{-0.5, 18.5}, {-0.5, 16.5}}, AspectRatio -> Automatic]& ), "WorkspaceOutputRaftRegenerateIcon" -> PaneSelectorBox[{False-> FrameBox[ diff --git a/Source/Chatbook/ChatModes/UI.wl b/Source/Chatbook/ChatModes/UI.wl index c6bfdc8e..2298bf6c 100644 --- a/Source/Chatbook/ChatModes/UI.wl +++ b/Source/Chatbook/ChatModes/UI.wl @@ -39,6 +39,12 @@ $inputFieldFrameOptions = Sequence[ FrameStyle -> Directive[ AbsoluteThickness[ 2 ], RGBColor[ "#a3c9f2" ] ] ]; +$actionMenuItemOptions = Sequence[ + BaseStyle -> { FontColor -> RGBColor[ "#333333" ], FontSize -> 13 }, + ImageSize -> Scaled[ 1. ], + RoundingRadius -> 2 +]; + $useGravatarImages := useGravatarImagesQ[ ]; $userImageParams = <| "size" -> 40, "default" -> "404", "rating" -> "G" |>; @@ -1056,7 +1062,7 @@ attachAssistantMessageButtons[ cell0_CellObject, True ] := Enclose[ Cell[ BoxData @ assistantMessageButtons @ includeFeedback, "ChatOutputTrayButtons", - Magnification -> AbsoluteCurrentValue[ cell, Magnification ] + Magnification -> AbsoluteCurrentValue[ cell, Magnification ] * 0.85 ], { Left, Bottom }, 0, @@ -1081,18 +1087,7 @@ assistantMessageButtons[ includeFeedback_ ] := assistantMessageButtons[ includeF ToBoxes @ DynamicModule[ { cell }, Grid[ { { - ActionMenu[ - Tooltip[ $clipboardLabel, tr[ "WorkspaceOutputRaftCopyAsTooltip" ] ], - { - "Copy as\[Ellipsis]" :> Null, - " Cells" :> ChatbookAction[ "CopyExplodedCells", cell ], - " Plain Text" :> ChatbookAction[ "CopyPlainText" , cell ], - " Image" :> ChatbookAction[ "CopyImage" , cell ] - }, - Appearance -> "Suppressed", - Method -> "Queued", - MenuStyle -> { Magnification -> Inherited/0.85 } - ], + assistantCopyAsActionMenu[ Dynamic[ cell ] ], Button[ Tooltip[ $regenerateLabel, tr[ "WorkspaceOutputRaftRegenerateTooltip" ] ], ChatbookAction[ "RegenerateAssistantMessage", cell ], @@ -1133,6 +1128,86 @@ $regenerateLabel := $regenerateLabel = chatbookIcon[ "WorkspaceOutputRaftRegener $thumbsUpLabel := $thumbsUpLabel = chatbookIcon[ "WorkspaceOutputRaftThumbsUpIcon" , False ]; $thumbsDownLabel := $thumbsDownLabel = chatbookIcon[ "WorkspaceOutputRaftThumbsDownIcon", False ]; +(* ::**************************************************************************************************************:: *) +(* ::Subsubsection::Closed:: *) +assistantCopyAsActionMenu // beginDefinition; + +assistantCopyAsActionMenu[ Dynamic[ cell_ ] ] := +DynamicModule[ { Typeset`menuActiveQ = False }, + EventHandler[ + PaneSelector[ + { + "Default" -> + Framed[ + chatbookIcon[ "WorkspaceOutputRaftClipboardIcon" , False, RGBColor[ "#3383AC" ] ], + Background -> RGBColor[ "#FFFFFF" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#FFFFFF" ] ], + "Hover" -> + Framed[ + chatbookIcon[ "WorkspaceOutputRaftClipboardIcon" , False, RGBColor[ "#3383AC" ] ], + Background -> RGBColor[ "#DBEDF7" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#DBEDF7" ] ], + "Down" -> + Framed[ + chatbookIcon[ "WorkspaceOutputRaftClipboardIcon" , False, RGBColor[ "#FFFFFF" ] ], + Background -> RGBColor[ "#469ECB" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#469ECB" ] ] }, + Dynamic[ + Which[ + Typeset`menuActiveQ, "Down", + CurrentValue[ "MouseOver" ], "Hover", + True, "Default" ]], + ImageSize -> Automatic ], + { + "MouseDown" :> ( + Typeset`menuActiveQ = True; + AttachCell[ EvaluationBox[ ], + Cell[ BoxData @ ToBoxes @ + DynamicModule[ { }, + Framed[ + Grid[ + { + { Style[ tr[ "WorkspaceOutputRaftCopyAs" ], FontColor -> RGBColor[ "#898989" ], FontSize -> 12 ] }, + { assistantActionMenuItem[ tr[ "WorkspaceOutputRaftCopyAsNotebookCells" ], ChatbookAction[ "CopyExplodedCells", cell ] ] }, + { assistantActionMenuItem[ tr[ "WorkspaceOutputRaftCopyAsPlainText" ], ChatbookAction[ "CopyPlainText", cell ] ] }, + { assistantActionMenuItem[ tr[ "WorkspaceOutputRaftCopyAsImage" ], ChatbookAction[ "CopyImage", cell ] ] } + }, + Alignment -> Left, + BaseStyle -> { FontFamily -> "Source Sans Pro" }, + Spacings -> { 0, { 0, 0.5, { 0 } } } + ], + Background -> White, FrameStyle -> RGBColor[ "#E5E5E5" ], ImageSize -> 158, RoundingRadius -> 4 ], + InheritScope -> True, + Initialization :> (True), (* Deinit won't run without an Init *) + Deinitialization :> (Typeset`menuActiveQ = False) + ], + CellTags -> "CustomActionMenu", + Magnification -> Inherited * 0.85 ], + { Left, Bottom }, 0, { Left, Top }, + RemovalConditions -> "MouseExit" ]) }, + PassEventsDown -> True, + Method -> "Preemptive", + PassEventsUp -> True ]] + +assistantCopyAsActionMenu // endDefinition; + +(* ::**************************************************************************************************************:: *) +(* ::Subsubsection::Closed:: *) +assistantActionMenuItem // beginDefinition; + +assistantActionMenuItem // Attributes = { HoldRest }; + +assistantActionMenuItem[ label_, clickAction_ ] := +Button[ + mouseDown[ + Framed[ label, $actionMenuItemOptions, Background -> None, FrameStyle -> None ], + Framed[ label, $actionMenuItemOptions, Background -> GrayLevel[ 1. ], FrameStyle -> GrayLevel[ 0.82 ] ], + Framed[ label, $actionMenuItemOptions, Background -> GrayLevel[ 0.9 ], FrameStyle -> GrayLevel[ 0.749 ] ] ], + clickAction; + NotebookDelete[ Cells[ EvaluationNotebook[ ], AttachedCell -> True, CellTags -> "CustomActionMenu" ]], + Appearance -> "Suppressed", + Method -> "Queued", + ImageSize -> Automatic ] + +assistantActionMenuItem // endDefinition + (* ::**************************************************************************************************************:: *) (* ::Section::Closed:: *) (*Chat Notebook Conversion*) From 1d276d1ebd66b871e805b30f8bcf14730eb675af Mon Sep 17 00:00:00 2001 From: Kevin Daily Date: Wed, 20 Nov 2024 14:19:02 -0800 Subject: [PATCH 3/9] Add sharing action menu --- .../WorkspaceOutputRaftShareIcon.wl | 149 ++++++++++++++++++ FrontEnd/TextResources/ChatbookResources.tr | 67 +++++++- FrontEnd/TextResources/ChatbookStrings.tr | 4 + .../ChineseTraditional/ChatbookStrings.tr | 4 + .../TextResources/French/ChatbookStrings.tr | 4 + .../TextResources/Japanese/ChatbookStrings.tr | 4 + .../TextResources/Korean/ChatbookStrings.tr | 4 + .../TextResources/Spanish/ChatbookStrings.tr | 4 + Source/Chatbook/ChatModes/UI.wl | 61 +++++++ 9 files changed, 300 insertions(+), 1 deletion(-) create mode 100644 Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftShareIcon.wl diff --git a/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftShareIcon.wl b/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftShareIcon.wl new file mode 100644 index 00000000..efc1d0e3 --- /dev/null +++ b/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftShareIcon.wl @@ -0,0 +1,149 @@ +(* Created with the Wolfram Language : www.wolfram.com *) +Function[Evaluate @ ToBoxes @ +Graphics[{Thickness[0.05555555555555555], + Style[{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}}, {{1, 4, 3}, {1, 3, 3}, + {1, 3, 3}, {1, 3, 3}}, {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, + {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, {{1, 4, 3}, {1, 3, 3}, + {1, 3, 3}, {1, 3, 3}}}, {{{10.419599533081055, 0.9100000262260437}, + {9.517599523067474, 0.9100000262260437}, {8.786599516868591, + 1.6130000352859497}, {8.786599516868591, 2.4789999127388}, + {8.786599516868591, 3.345000207424164}, {9.517599523067474, + 4.047999799251556}, {10.419599533081055, 4.047999799251556}, + {11.321599543094635, 4.047999799251556}, {12.052599549293518, + 3.345000207424164}, {12.052599549293518, 2.4789999127388}, + {12.052599549293518, 1.6130000352859497}, {11.321599543094635, + 0.9100000262260437}, {10.419599533081055, 0.9100000262260437}}, + {{10.419599533081055, 4.957999885082245}, {8.99459958076477, + 4.957999885082245}, {7.839599609375, 3.8490001559257507}, + {7.839599609375, 2.4789999127388}, {7.839599609375, + 1.110000029206276}, {8.99459958076477, 0.}, {10.419599533081055, 0.}, + {11.844599485397339, 0.}, {12.99959945678711, 1.110000029206276}, + {12.99959945678711, 2.4789999127388}, {12.99959945678711, + 3.8490001559257507}, {11.844599485397339, 4.957999885082245}, + {10.419599533081055, 4.957999885082245}}, + {{10.419599533081055, 13.090000331401825}, {11.321599543094635, + 13.090000331401825}, {12.052599549293518, 12.386999309062958}, + {12.052599549293518, 11.521001040935516}, {12.052599549293518, + 10.654999911785126}, {11.321599543094635, 9.951999843120575}, + {10.419599533081055, 9.951999843120575}, {9.517599523067474, + 9.951999843120575}, {8.786599516868591, 10.654999911785126}, + {8.786599516868591, 11.521001040935516}, {8.786599516868591, + 12.386999309062958}, {9.517599523067474, 13.090000331401825}, + {10.419599533081055, 13.090000331401825}}, + {{10.419599533081055, 9.041999995708466}, {11.844599485397339, + 9.041999995708466}, {12.99959945678711, 10.151000201702118}, + {12.99959945678711, 11.521001040935516}, {12.99959945678711, + 12.889999568462372}, {11.844599485397339, 14.000000178813934}, + {10.419599533081055, 14.000000178813934}, {8.99459958076477, + 14.000000178813934}, {7.839599609375, 12.889999568462372}, + {7.839599609375, 11.521001040935516}, {7.839599609375, + 10.151000201702118}, {8.99459958076477, 9.041999995708466}, + {10.419599533081055, 9.041999995708466}}, + {{2.580599308013916, 4.930999934673309}, {1.6785993576049805, + 4.930999934673309}, {0.9476003646850586, 5.63400000333786}, + {0.9476003646850586, 6.500000178813934}, {0.9476003646850586, + 7.3660003542900085}, {1.6785993576049805, 8.068999946117401}, + {2.580599308013916, 8.068999946117401}, {3.4815993309020996, + 8.068999946117401}, {4.213599681854248, 7.3660003542900085}, + {4.213599681854248, 6.500000178813934}, {4.213599681854248, + 5.63400000333786}, {3.4815993309020996, 4.930999934673309}, + {2.580599308013916, 4.930999934673309}}, + {{2.580599308013916, 8.979000270366669}, {1.1545991897583008, + 8.979000270366669}, {-0.000400543212890625, 7.869000136852264}, + {-0.000400543212890625, 6.500000178813934}, {-0.000400543212890625, + 5.130999743938446}, {1.1545991897583008, 4.020999848842621}, + {2.580599308013916, 4.020999848842621}, {4.005599021911621, + 4.020999848842621}, {5.160599708557129, 5.130999743938446}, + {5.160599708557129, 6.500000178813934}, {5.160599708557129, + 7.869000136852264}, {4.005599021911621, 8.979000270366669}, + {2.580599308013916, 8.979000270366669}}}]}, + FaceForm[#1]], + Style[{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}}, {{1, 4, 3}, {1, 3, 3}, + {1, 3, 3}, {1, 3, 3}}, {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, + {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, {{1, 4, 3}, {1, 3, 3}, + {1, 3, 3}, {1, 3, 3}}}, {{{10.419599533081055, 0.9100000262260437}, + {9.517599523067474, 0.9100000262260437}, {8.786599516868591, + 1.6130000352859497}, {8.786599516868591, 2.4789999127388}, + {8.786599516868591, 3.345000207424164}, {9.517599523067474, + 4.047999799251556}, {10.419599533081055, 4.047999799251556}, + {11.321599543094635, 4.047999799251556}, {12.052599549293518, + 3.345000207424164}, {12.052599549293518, 2.4789999127388}, + {12.052599549293518, 1.6130000352859497}, {11.321599543094635, + 0.9100000262260437}, {10.419599533081055, 0.9100000262260437}}, + {{10.419599533081055, 4.957999885082245}, {8.99459958076477, + 4.957999885082245}, {7.839599609375, 3.8490001559257507}, + {7.839599609375, 2.4789999127388}, {7.839599609375, + 1.110000029206276}, {8.99459958076477, 0.}, {10.419599533081055, 0.}, + {11.844599485397339, 0.}, {12.99959945678711, 1.110000029206276}, + {12.99959945678711, 2.4789999127388}, {12.99959945678711, + 3.8490001559257507}, {11.844599485397339, 4.957999885082245}, + {10.419599533081055, 4.957999885082245}}, + {{10.419599533081055, 13.090000331401825}, {11.321599543094635, + 13.090000331401825}, {12.052599549293518, 12.386999309062958}, + {12.052599549293518, 11.521001040935516}, {12.052599549293518, + 10.654999911785126}, {11.321599543094635, 9.951999843120575}, + {10.419599533081055, 9.951999843120575}, {9.517599523067474, + 9.951999843120575}, {8.786599516868591, 10.654999911785126}, + {8.786599516868591, 11.521001040935516}, {8.786599516868591, + 12.386999309062958}, {9.517599523067474, 13.090000331401825}, + {10.419599533081055, 13.090000331401825}}, + {{10.419599533081055, 9.041999995708466}, {11.844599485397339, + 9.041999995708466}, {12.99959945678711, 10.151000201702118}, + {12.99959945678711, 11.521001040935516}, {12.99959945678711, + 12.889999568462372}, {11.844599485397339, 14.000000178813934}, + {10.419599533081055, 14.000000178813934}, {8.99459958076477, + 14.000000178813934}, {7.839599609375, 12.889999568462372}, + {7.839599609375, 11.521001040935516}, {7.839599609375, + 10.151000201702118}, {8.99459958076477, 9.041999995708466}, + {10.419599533081055, 9.041999995708466}}, + {{2.580599308013916, 4.930999934673309}, {1.6785993576049805, + 4.930999934673309}, {0.9476003646850586, 5.63400000333786}, + {0.9476003646850586, 6.500000178813934}, {0.9476003646850586, + 7.3660003542900085}, {1.6785993576049805, 8.068999946117401}, + {2.580599308013916, 8.068999946117401}, {3.4815993309020996, + 8.068999946117401}, {4.213599681854248, 7.3660003542900085}, + {4.213599681854248, 6.500000178813934}, {4.213599681854248, + 5.63400000333786}, {3.4815993309020996, 4.930999934673309}, + {2.580599308013916, 4.930999934673309}}, + {{2.580599308013916, 8.979000270366669}, {1.1545991897583008, + 8.979000270366669}, {-0.000400543212890625, 7.869000136852264}, + {-0.000400543212890625, 6.500000178813934}, {-0.000400543212890625, + 5.130999743938446}, {1.1545991897583008, 4.020999848842621}, + {2.580599308013916, 4.020999848842621}, {4.005599021911621, + 4.020999848842621}, {5.160599708557129, 5.130999743938446}, + {5.160599708557129, 6.500000178813934}, {5.160599708557129, + 7.869000136852264}, {4.005599021911621, 8.979000270366669}, + {2.580599308013916, 8.979000270366669}}}]}, + FaceForm[#1]], + Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, + {{{3.7904999256134033, 4.926400184631348}, {8.50249981880188, + 2.789400339126587}, {9.004500150680542, 3.791400194168091}, + {4.292499899864197, 5.928400158882141}, {3.7904999256134033, + 4.926400184631348}}}]}, FaceForm[#1]], + Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, + {{{3.9932000637054443, 8.34280014038086}, {4.633200109004974, + 7.422800123691559}, {8.802200078964233, 10.103800177574158}, + {8.16219973564148, 11.023799896240234}, {3.9932000637054443, + 8.34280014038086}}}]}, FaceForm[#1]], + Style[{FilledCurve[{{{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, + {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}}, + {{{17.853498458862305, 7.853400230407715}, {17.658498466014862, + 8.048400223255157}, {17.341498494148254, 8.048400223255157}, + {17.146498441696167, 7.853400230407715}, {15.49949860572815, + 6.20740020275116}, {13.853498458862305, 7.853400230407715}, + {13.658498287200928, 8.048400223255157}, {13.341498374938965, + 8.048400223255157}, {13.146498680114746, 7.853400230407715}, + {12.95149850845337, 7.658400237560272}, {12.95149850845337, + 7.3414002656936646}, {13.146498680114746, 7.146400213241577}, + {15.146498441696167, 5.146400213241577}, {15.244498491287231, + 5.048400163650513}, {15.372498512268066, 4.99940037727356}, + {15.49949860572815, 4.99940037727356}, {15.627498388290405, + 4.99940037727356}, {15.75549864768982, 5.048400163650513}, + {15.853498458862305, 5.146400213241577}, {17.853498458862305, + 7.146400213241577}, {18.048498451709747, 7.3414002656936646}, + {18.048498451709747, 7.658400237560272}, {17.853498458862305, + 7.853400230407715}}}]}, FaceForm[#1]]}, ImageSize -> {19., 15.}, + PlotRange -> {{-0.5, 18.5}, {-0.5, 14.5}}, AspectRatio -> Automatic] +] diff --git a/FrontEnd/TextResources/ChatbookResources.tr b/FrontEnd/TextResources/ChatbookResources.tr index d07a6a1a..680e8607 100644 --- a/FrontEnd/TextResources/ChatbookResources.tr +++ b/FrontEnd/TextResources/ChatbookResources.tr @@ -5543,7 +5543,72 @@ hPG91XSQ1r+rwnZQz0FvwoIfhm3KUHFtB2neB7oTgO6HhT96fAAASQiSDg== 1.}, {8., 3.}, {9., 3.}, {9., 0.}}}]}, AspectRatio->Automatic, ImageSize->{12, 12}, - PlotRange->{{-0.5, 9.5}, {-0.5, 9.5}}] + PlotRange->{{-0.5, 9.5}, {-0.5, 9.5}}], + +"WorkspaceOutputRaftShareIcon" -> (GraphicsBox[{ + Thickness[0.05555555555555555], + StyleBox[{ + 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}}, {{1, 4, 3}, {1, 3, 3}, {1, 3, + 3}, {1, 3, 3}}, {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, {{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[" +1:eJxd079LAmEYB/AXLSGzuEgbhNLLyx8hQVMQxb1/QGFYg1BDRG2BS0RuthxE +g9DUH2DRFNGURHU4WJQ4WZA2NFVDCQUFRVJ3el957l44Xz7D93mee99TXErG +V+yMMYf2dGmPjTWWensncW1fPBl4k7W9ZOsIUEfPdkTd/vvSN/VLvWznxBuZ +vJOT/ENwVOCkPnx8kA1Sz9W8YZqHUR9Gf+Qxn3V++LVe7tX38ERdpGbqvE/f +d9Xrbmr0g5cz+XeZ5LFQHyuRPApRp2/+IjQPoz6M/shjPuv8sOIeGabnB+N8 +ClIhTL2vOkPUwYXYkCm/+hww1TeM+4Nxv8jDqA+jfytvzGedH3Zsegbp+8M4 +n6fYtESNfrDj8DJiymujmOobxv3BuF/kYdSH0b+VN+azzs979tr03ZXINb+v +7eqPTH0er+meGtvqo3Yx5qUuXq330/zXbMBP68PqTKWT+jFXafyPkIdRH0Z/ +5DGfdX5YkT+b3/1k6kOmZnz8QvuNVlM+6tb7GC5Kipvmf9MegdaH1dN2gZqv +ZRs55GHUh9Efecxnmv8f/I8qiA== + "]]}, { + FaceForm[#]}, StripOnInput -> False], + StyleBox[{ + 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}}, {{1, 4, 3}, {1, 3, 3}, {1, 3, + 3}, {1, 3, 3}}, {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}, {{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[" +1:eJxd079LAmEYB/AXLSGzuEgbhNLLyx8hQVMQxb1/QGFYg1BDRG2BS0RuthxE +g9DUH2DRFNGURHU4WJQ4WZA2NFVDCQUFRVJ3el957l44Xz7D93mee99TXErG +V+yMMYf2dGmPjTWWensncW1fPBl4k7W9ZOsIUEfPdkTd/vvSN/VLvWznxBuZ +vJOT/ENwVOCkPnx8kA1Sz9W8YZqHUR9Gf+Qxn3V++LVe7tX38ERdpGbqvE/f +d9Xrbmr0g5cz+XeZ5LFQHyuRPApRp2/+IjQPoz6M/shjPuv8sOIeGabnB+N8 +ClIhTL2vOkPUwYXYkCm/+hww1TeM+4Nxv8jDqA+jfytvzGedH3Zsegbp+8M4 +n6fYtESNfrDj8DJiymujmOobxv3BuF/kYdSH0b+VN+azzs979tr03ZXINb+v +7eqPTH0er+meGtvqo3Yx5qUuXq330/zXbMBP68PqTKWT+jFXafyPkIdRH0Z/ +5DGfdX5YkT+b3/1k6kOmZnz8QvuNVlM+6tb7GC5Kipvmf9MegdaH1dN2gZqv +ZRs55GHUh9Efecxnmv8f/I8qiA== + "]]}, { + FaceForm[#]}, StripOnInput -> False], + StyleBox[{ + FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ + 3.7904999256134033`, 4.926400184631348}, {8.50249981880188, + 2.789400339126587}, {9.004500150680542, 3.791400194168091}, { + 4.292499899864197, 5.928400158882141}, {3.7904999256134033`, + 4.926400184631348}}}]}, { + FaceForm[#]}, StripOnInput -> False], + StyleBox[{ + FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ + 3.9932000637054443`, 8.34280014038086}, {4.633200109004974, + 7.422800123691559}, {8.802200078964233, 10.103800177574158`}, { + 8.16219973564148, 11.023799896240234`}, {3.9932000637054443`, + 8.34280014038086}}}]}, { + FaceForm[#]}, StripOnInput -> False], + StyleBox[{ + FilledCurveBox[{{{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, { + 0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}}, CompressedData[" + +1:eJxTTMoPSmVmYGBgBGJxIGZiAIMHdbcMHYD0gYeZ8iA6evIKMP/VcQkFEF2U +E47Cf9OgiqLeY99/PRC9I+GKBFj87xZtZPkNaoHayPof3FinhcJn9NZCVn9B +67kmiF5jvEgOmc8xI1YWWf2Hl1NlQPQNRm89KF8ERL/QqwXzL/QbgvkKO/ZB ++En/hZHdC+NXuDvqI/N3XGjSR9YP9I8+svmw8ILZn5rFY4TsPhgf5n6U8AUA +JzxmIQ== + "]]}, { + FaceForm[#]}, StripOnInput -> False]}, ImageSize -> {19., 15.}, + PlotRange -> {{-0.5, 18.5}, {-0.5, 14.5}}, AspectRatio -> Automatic]& ) } @| @| diff --git a/FrontEnd/TextResources/ChatbookStrings.tr b/FrontEnd/TextResources/ChatbookStrings.tr index 399db9f1..7016efda 100644 --- a/FrontEnd/TextResources/ChatbookStrings.tr +++ b/FrontEnd/TextResources/ChatbookStrings.tr @@ -216,6 +216,10 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", +"WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", +"WorkspaceOutputRaftShareAsPDF" -> "PDF", +"WorkspaceOutputRaftShareAsImage" -> "Image", "WorkspaceOutputRaftFeedbackTooltip" -> "Send feedback to Wolfram", "InlineChatButtonTooltipClose" -> "Close", diff --git a/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr b/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr index 4e644a35..d99f846d 100644 --- a/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr +++ b/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr @@ -216,6 +216,10 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", +"WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", +"WorkspaceOutputRaftShareAsPDF" -> "PDF", +"WorkspaceOutputRaftShareAsImage" -> "Image", "WorkspaceOutputRaftFeedbackTooltip" -> "\:767C\:9001\:56DE\:994B\:81F3 Wolfram", "InlineChatButtonTooltipClose" -> "\:95DC\:9589", diff --git a/FrontEnd/TextResources/French/ChatbookStrings.tr b/FrontEnd/TextResources/French/ChatbookStrings.tr index e408c94e..92e1c3ec 100644 --- a/FrontEnd/TextResources/French/ChatbookStrings.tr +++ b/FrontEnd/TextResources/French/ChatbookStrings.tr @@ -216,6 +216,10 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", +"WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", +"WorkspaceOutputRaftShareAsPDF" -> "PDF", +"WorkspaceOutputRaftShareAsImage" -> "Image", "WorkspaceOutputRaftFeedbackTooltip" -> "Envoyer un commentaire \[AGrave] Wolfram", "InlineChatButtonTooltipClose" -> "Fermer", diff --git a/FrontEnd/TextResources/Japanese/ChatbookStrings.tr b/FrontEnd/TextResources/Japanese/ChatbookStrings.tr index fbfc1344..fd5ffc41 100644 --- a/FrontEnd/TextResources/Japanese/ChatbookStrings.tr +++ b/FrontEnd/TextResources/Japanese/ChatbookStrings.tr @@ -216,6 +216,10 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", +"WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", +"WorkspaceOutputRaftShareAsPDF" -> "PDF", +"WorkspaceOutputRaftShareAsImage" -> "Image", "WorkspaceOutputRaftFeedbackTooltip" -> "\:30d5\:30a3\:30fc\:30c9\:30d0\:30c3\:30af\:3092Wolfram\:306b\:9001\:4fe1\:3059\:308b", "InlineChatButtonTooltipClose" -> "\:9589\:3058\:308b", diff --git a/FrontEnd/TextResources/Korean/ChatbookStrings.tr b/FrontEnd/TextResources/Korean/ChatbookStrings.tr index 2151b422..df81998f 100644 --- a/FrontEnd/TextResources/Korean/ChatbookStrings.tr +++ b/FrontEnd/TextResources/Korean/ChatbookStrings.tr @@ -217,6 +217,10 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", +"WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", +"WorkspaceOutputRaftShareAsPDF" -> "PDF", +"WorkspaceOutputRaftShareAsImage" -> "Image", "WorkspaceOutputRaftFeedbackTooltip" -> "Wolfram\:C5D0 \:D53C\:B4DC\:BC31 \:BCF4\:B0B4\:AE30", "InlineChatButtonTooltipClose" -> "\:B2EB\:AE30", diff --git a/FrontEnd/TextResources/Spanish/ChatbookStrings.tr b/FrontEnd/TextResources/Spanish/ChatbookStrings.tr index 16082261..22d7d738 100644 --- a/FrontEnd/TextResources/Spanish/ChatbookStrings.tr +++ b/FrontEnd/TextResources/Spanish/ChatbookStrings.tr @@ -216,6 +216,10 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", +"WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", +"WorkspaceOutputRaftShareAsPDF" -> "PDF", +"WorkspaceOutputRaftShareAsImage" -> "Image", "WorkspaceOutputRaftFeedbackTooltip" -> "Enviar comentarios a Wolfram", "InlineChatButtonTooltipClose" -> "Cerrar", diff --git a/Source/Chatbook/ChatModes/UI.wl b/Source/Chatbook/ChatModes/UI.wl index 2298bf6c..1d044963 100644 --- a/Source/Chatbook/ChatModes/UI.wl +++ b/Source/Chatbook/ChatModes/UI.wl @@ -1097,6 +1097,7 @@ assistantMessageButtons[ includeFeedback_ ] := assistantMessageButtons[ includeF If[ TrueQ @ includeFeedback, Splice @ { Item[ Spacer[ 0 ], ItemSize -> Fit ], + assistantShareAsActionMenu[ Dynamic[ cell ] ], Button[ Tooltip[ $thumbsUpLabel, tr[ "WorkspaceOutputRaftFeedbackTooltip" ] ], ChatbookAction[ "SendFeedback", cell, True ], @@ -1188,6 +1189,66 @@ DynamicModule[ { Typeset`menuActiveQ = False }, assistantCopyAsActionMenu // endDefinition; +(* ::**************************************************************************************************************:: *) +(* ::Subsubsection::Closed:: *) +assistantShareAsActionMenu // beginDefinition; + +assistantShareAsActionMenu[ Dynamic[ cell_ ] ] := +DynamicModule[ { Typeset`menuActiveQ = False }, + EventHandler[ + PaneSelector[ + { + "Default" -> + Framed[ + chatbookIcon[ "WorkspaceOutputRaftShareIcon" , False, RGBColor[ "#3383AC" ] ], + Background -> RGBColor[ "#FFFFFF" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#FFFFFF" ] ], + "Hover" -> + Framed[ + chatbookIcon[ "WorkspaceOutputRaftShareIcon" , False, RGBColor[ "#3383AC" ] ], + Background -> RGBColor[ "#DBEDF7" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#DBEDF7" ] ], + "Down" -> + Framed[ + chatbookIcon[ "WorkspaceOutputRaftShareIcon" , False, RGBColor[ "#FFFFFF" ] ], + Background -> RGBColor[ "#469ECB" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#469ECB" ] ] }, + Dynamic[ + Which[ + Typeset`menuActiveQ, "Down", + CurrentValue[ "MouseOver" ], "Hover", + True, "Default" ]], + ImageSize -> Automatic ], + { + "MouseDown" :> ( + Typeset`menuActiveQ = True; + AttachCell[ EvaluationBox[ ], + Cell[ BoxData @ ToBoxes @ + DynamicModule[ { }, + Framed[ + Grid[ + { + { Style[ tr[ "WorkspaceOutputRaftShareAs" ], FontColor -> RGBColor[ "#898989" ], FontSize -> 12 ] }, + { assistantActionMenuItem[ tr[ "WorkspaceOutputRaftShareAsCloudDeployment" ], ChatbookAction[ "ShareAsCloudDeployment", cell ] ] }, + { assistantActionMenuItem[ tr[ "WorkspaceOutputRaftShareAsPDF" ], ChatbookAction[ "ShareAsPDF", cell ] ] }, + { assistantActionMenuItem[ tr[ "WorkspaceOutputRaftShareAsImage" ], ChatbookAction[ "ShareAsImage", cell ] ] } + }, + Alignment -> Left, + BaseStyle -> { FontFamily -> "Source Sans Pro" }, + Spacings -> { 0, { 0, 0.5, { 0 } } } + ], + Background -> White, FrameStyle -> RGBColor[ "#E5E5E5" ], ImageSize -> 158, RoundingRadius -> 4 ], + InheritScope -> True, + Initialization :> (True), (* Deinit won't run without an Init *) + Deinitialization :> (Typeset`menuActiveQ = False) + ], + CellTags -> "CustomActionMenu", + Magnification -> Inherited * 0.85 ], + { Right, Bottom }, 0, { Right, Top }, (* Because this is an attached cell, it has to exist within the NA window *) + RemovalConditions -> "MouseExit" ]) }, + PassEventsDown -> True, + Method -> "Preemptive", + PassEventsUp -> True ]] + +assistantShareAsActionMenu // endDefinition; + (* ::**************************************************************************************************************:: *) (* ::Subsubsection::Closed:: *) assistantActionMenuItem // beginDefinition; From ecc6b597d0b37cc617abbb52d52c280500878489 Mon Sep 17 00:00:00 2001 From: Kevin Daily Date: Wed, 20 Nov 2024 15:47:29 -0800 Subject: [PATCH 4/9] Make output raft buttons the same size and center aligned --- .../WorkspaceOutputRaftRegenerateIcon.wl | 8 +++++-- .../WorkspaceOutputRaftThumbsDownIcon.wl | 8 +++++-- .../WorkspaceOutputRaftThumbsUpIcon.wl | 8 +++++-- FrontEnd/TextResources/ChatbookResources.tr | 24 ++++++++++++++----- Source/Chatbook/ChatModes/UI.wl | 20 ++++++++++------ 5 files changed, 49 insertions(+), 19 deletions(-) diff --git a/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftRegenerateIcon.wl b/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftRegenerateIcon.wl index fc0320b5..7337bfc5 100644 --- a/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftRegenerateIcon.wl +++ b/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftRegenerateIcon.wl @@ -91,9 +91,11 @@ RawBoxes @ ToBoxes @ Mouseover[ PlotRange -> { { -0.5, 14.5 }, { -0.5, 14.5 } }, AspectRatio -> Automatic ], + Alignment -> { Center, Center }, + ImageSize -> { 22, 22 }, Background -> GrayLevel[ 1 ], RoundingRadius -> 3, - FrameMargins -> 3, + FrameMargins -> 0, FrameStyle -> GrayLevel[ 1 ] ], Framed[ @@ -186,9 +188,11 @@ RawBoxes @ ToBoxes @ Mouseover[ PlotRange -> { { -0.5, 14.5 }, { -0.5, 14.5 } }, AspectRatio -> Automatic ], + Alignment -> { Center, Center }, + ImageSize -> { 22, 22 }, Background -> RGBColor[ 0.85882, 0.92941, 0.96863 ], RoundingRadius -> 3, - FrameMargins -> 3, + FrameMargins -> 0, FrameStyle -> RGBColor[ 0.85882, 0.92941, 0.96863 ] ] ] \ No newline at end of file diff --git a/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftThumbsDownIcon.wl b/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftThumbsDownIcon.wl index 7d0a5c04..e0132f0c 100644 --- a/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftThumbsDownIcon.wl +++ b/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftThumbsDownIcon.wl @@ -304,9 +304,11 @@ RawBoxes @ ToBoxes @ Mouseover[ PlotRange -> { { -0.5, 15.5 }, { -0.5, 14.5 } }, AspectRatio -> Automatic ], + Alignment -> { Center, Center }, + ImageSize -> { 22, 22 }, Background -> GrayLevel[ 1 ], RoundingRadius -> 3, - FrameMargins -> 3, + FrameMargins -> 0, FrameStyle -> GrayLevel[ 1 ] ], Framed[ @@ -612,9 +614,11 @@ RawBoxes @ ToBoxes @ Mouseover[ PlotRange -> { { -0.5, 15.5 }, { -0.5, 14.5 } }, AspectRatio -> Automatic ], + Alignment -> { Center, Center }, + ImageSize -> { 22, 22 }, Background -> RGBColor[ 0.85882, 0.92941, 0.96863 ], RoundingRadius -> 3, - FrameMargins -> 3, + FrameMargins -> 0, FrameStyle -> RGBColor[ 0.85882, 0.92941, 0.96863 ] ] ] \ No newline at end of file diff --git a/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftThumbsUpIcon.wl b/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftThumbsUpIcon.wl index bcd21757..088883c5 100644 --- a/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftThumbsUpIcon.wl +++ b/Developer/Resources/FrontEndResources/WorkspaceChat/OutputRaft/WorkspaceOutputRaftThumbsUpIcon.wl @@ -304,9 +304,11 @@ RawBoxes @ ToBoxes @ Mouseover[ PlotRange -> { { -0.5, 15.5 }, { -0.5, 14.5 } }, AspectRatio -> Automatic ], + Alignment -> { Center, Center }, + ImageSize -> { 22, 22 }, Background -> GrayLevel[ 1 ], RoundingRadius -> 3, - FrameMargins -> 3, + FrameMargins -> 0, FrameStyle -> GrayLevel[ 1 ] ], Framed[ @@ -612,9 +614,11 @@ RawBoxes @ ToBoxes @ Mouseover[ PlotRange -> { { -0.5, 15.5 }, { -0.5, 14.5 } }, AspectRatio -> Automatic ], + Alignment -> { Center, Center }, + ImageSize -> { 22, 22 }, Background -> RGBColor[ 0.85882, 0.92941, 0.96863 ], RoundingRadius -> 3, - FrameMargins -> 3, + FrameMargins -> 0, FrameStyle -> RGBColor[ 0.85882, 0.92941, 0.96863 ] ] ] \ No newline at end of file diff --git a/FrontEnd/TextResources/ChatbookResources.tr b/FrontEnd/TextResources/ChatbookResources.tr index 680e8607..afd0359e 100644 --- a/FrontEnd/TextResources/ChatbookResources.tr +++ b/FrontEnd/TextResources/ChatbookResources.tr @@ -5109,9 +5109,11 @@ LVZxWAB0hkqbhsPtn3VZe0pg7sOdblDlP9jjSkcA2wtoqg== AspectRatio->Automatic, ImageSize->{15., 15.}, PlotRange->{{-0.5, 14.5}, {-0.5, 14.5}}], + Alignment->{Center, Center}, Background->GrayLevel[1], - FrameMargins->3, + FrameMargins->0, FrameStyle->GrayLevel[1], + ImageSize->{22, 22}, RoundingRadius->3, StripOnInput->False], True-> FrameBox[ @@ -5132,9 +5134,11 @@ LVZxWAB0hkqbhsPtn3VZe0pg7sOdblDlP9jjSkcA2wtoqg== AspectRatio->Automatic, ImageSize->{15., 15.}, PlotRange->{{-0.5, 14.5}, {-0.5, 14.5}}], + Alignment->{Center, Center}, Background->RGBColor[0.85882, 0.92941, 0.96863], - FrameMargins->3, + FrameMargins->0, FrameStyle->RGBColor[0.85882, 0.92941, 0.96863], + ImageSize->{22, 22}, RoundingRadius->3, StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], @@ -5218,9 +5222,11 @@ Ud/7f6aSsJiLSOn8+aPJdBIiIfjXHA02/V+fiML//zf/AQwp5lg= AspectRatio->Automatic, ImageSize->{16., 15.}, PlotRange->{{-0.5, 15.5}, {-0.5, 14.5}}], + Alignment->{Center, Center}, Background->GrayLevel[1], - FrameMargins->3, + FrameMargins->0, FrameStyle->GrayLevel[1], + ImageSize->{22, 22}, RoundingRadius->3, StripOnInput->False], True-> FrameBox[ @@ -5299,9 +5305,11 @@ Ud/7f6aSsJiLSOn8+aPJdBIiIfjXHA02/V+fiML//zf/AQwp5lg= AspectRatio->Automatic, ImageSize->{16., 15.}, PlotRange->{{-0.5, 15.5}, {-0.5, 14.5}}], + Alignment->{Center, Center}, Background->RGBColor[0.85882, 0.92941, 0.96863], - FrameMargins->3, + FrameMargins->0, FrameStyle->RGBColor[0.85882, 0.92941, 0.96863], + ImageSize->{22, 22}, RoundingRadius->3, StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], @@ -5388,9 +5396,11 @@ cTGO5EynT3RyqKZq7RiYg6VF6z9PHeJwhrY1VoQLeixn9kgOQ0VKoZ6jmOfP AspectRatio->Automatic, ImageSize->{16., 15.}, PlotRange->{{-0.5, 15.5}, {-0.5, 14.5}}], + Alignment->{Center, Center}, Background->GrayLevel[1], - FrameMargins->3, + FrameMargins->0, FrameStyle->GrayLevel[1], + ImageSize->{22, 22}, RoundingRadius->3, StripOnInput->False], True-> FrameBox[ @@ -5472,9 +5482,11 @@ cTGO5EynT3RyqKZq7RiYg6VF6z9PHeJwhrY1VoQLeixn9kgOQ0VKoZ6jmOfP AspectRatio->Automatic, ImageSize->{16., 15.}, PlotRange->{{-0.5, 15.5}, {-0.5, 14.5}}], + Alignment->{Center, Center}, Background->RGBColor[0.85882, 0.92941, 0.96863], - FrameMargins->3, + FrameMargins->0, FrameStyle->RGBColor[0.85882, 0.92941, 0.96863], + ImageSize->{22, 22}, RoundingRadius->3, StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], diff --git a/Source/Chatbook/ChatModes/UI.wl b/Source/Chatbook/ChatModes/UI.wl index 1d044963..d200fb6c 100644 --- a/Source/Chatbook/ChatModes/UI.wl +++ b/Source/Chatbook/ChatModes/UI.wl @@ -1115,7 +1115,7 @@ assistantMessageButtons[ includeFeedback_ ] := assistantMessageButtons[ includeF Nothing ] } }, - Alignment -> { Automatic, Baseline }, + Alignment -> { Automatic, Center }, Spacings -> 0 ], Initialization :> (cell = ParentCell @ EvaluationCell[ ]) @@ -1141,15 +1141,18 @@ DynamicModule[ { Typeset`menuActiveQ = False }, "Default" -> Framed[ chatbookIcon[ "WorkspaceOutputRaftClipboardIcon" , False, RGBColor[ "#3383AC" ] ], - Background -> RGBColor[ "#FFFFFF" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#FFFFFF" ] ], + Background -> RGBColor[ "#FFFFFF" ], RoundingRadius -> 3, FrameMargins -> 0, FrameStyle -> RGBColor[ "#FFFFFF" ], + Alignment -> { Center, Center }, ImageSize -> { 22, 22 } ], "Hover" -> Framed[ chatbookIcon[ "WorkspaceOutputRaftClipboardIcon" , False, RGBColor[ "#3383AC" ] ], - Background -> RGBColor[ "#DBEDF7" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#DBEDF7" ] ], + Background -> RGBColor[ "#DBEDF7" ], RoundingRadius -> 3, FrameMargins -> 0, FrameStyle -> RGBColor[ "#DBEDF7" ], + Alignment -> { Center, Center }, ImageSize -> { 22, 22 } ], "Down" -> Framed[ chatbookIcon[ "WorkspaceOutputRaftClipboardIcon" , False, RGBColor[ "#FFFFFF" ] ], - Background -> RGBColor[ "#469ECB" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#469ECB" ] ] }, + Background -> RGBColor[ "#469ECB" ], RoundingRadius -> 3, FrameMargins -> 0, FrameStyle -> RGBColor[ "#469ECB" ], + Alignment -> { Center, Center }, ImageSize -> { 22, 22 } ] }, Dynamic[ Which[ Typeset`menuActiveQ, "Down", @@ -1201,15 +1204,18 @@ DynamicModule[ { Typeset`menuActiveQ = False }, "Default" -> Framed[ chatbookIcon[ "WorkspaceOutputRaftShareIcon" , False, RGBColor[ "#3383AC" ] ], - Background -> RGBColor[ "#FFFFFF" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#FFFFFF" ] ], + Background -> RGBColor[ "#FFFFFF" ], RoundingRadius -> 3, FrameMargins -> 0, FrameStyle -> RGBColor[ "#FFFFFF" ], + Alignment -> { Center, Center }, ImageSize -> { 22, 22 } ], "Hover" -> Framed[ chatbookIcon[ "WorkspaceOutputRaftShareIcon" , False, RGBColor[ "#3383AC" ] ], - Background -> RGBColor[ "#DBEDF7" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#DBEDF7" ] ], + Background -> RGBColor[ "#DBEDF7" ], RoundingRadius -> 3, FrameMargins -> 0, FrameStyle -> RGBColor[ "#DBEDF7" ], + Alignment -> { Center, Center }, ImageSize -> { 22, 22 } ], "Down" -> Framed[ chatbookIcon[ "WorkspaceOutputRaftShareIcon" , False, RGBColor[ "#FFFFFF" ] ], - Background -> RGBColor[ "#469ECB" ], RoundingRadius -> 3, FrameMargins -> 3, FrameStyle -> RGBColor[ "#469ECB" ] ] }, + Background -> RGBColor[ "#469ECB" ], RoundingRadius -> 3, FrameMargins -> 0, FrameStyle -> RGBColor[ "#469ECB" ], + Alignment -> { Center, Center }, ImageSize -> { 22, 22 } ] }, Dynamic[ Which[ Typeset`menuActiveQ, "Down", From 8a3685825a2aa41e5e04627a3527e0bcf0493e39 Mon Sep 17 00:00:00 2001 From: Kevin Daily Date: Wed, 20 Nov 2024 15:57:34 -0800 Subject: [PATCH 5/9] Add tooltip to copy-as action menu --- Source/Chatbook/ChatModes/UI.wl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Chatbook/ChatModes/UI.wl b/Source/Chatbook/ChatModes/UI.wl index d200fb6c..4f1cac84 100644 --- a/Source/Chatbook/ChatModes/UI.wl +++ b/Source/Chatbook/ChatModes/UI.wl @@ -1087,7 +1087,7 @@ assistantMessageButtons[ includeFeedback_ ] := assistantMessageButtons[ includeF ToBoxes @ DynamicModule[ { cell }, Grid[ { { - assistantCopyAsActionMenu[ Dynamic[ cell ] ], + Tooltip[ assistantCopyAsActionMenu[ Dynamic[ cell ] ], tr[ "WorkspaceOutputRaftCopyAsTooltip" ] ], Button[ Tooltip[ $regenerateLabel, tr[ "WorkspaceOutputRaftRegenerateTooltip" ] ], ChatbookAction[ "RegenerateAssistantMessage", cell ], From 637a0f56ded350b0bdedf8b44e6777bc3aa31696 Mon Sep 17 00:00:00 2001 From: Kevin Daily Date: Wed, 20 Nov 2024 15:58:16 -0800 Subject: [PATCH 6/9] Add tooltip to share-as action menu --- FrontEnd/TextResources/ChatbookStrings.tr | 1 + FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr | 1 + FrontEnd/TextResources/French/ChatbookStrings.tr | 1 + FrontEnd/TextResources/Japanese/ChatbookStrings.tr | 1 + FrontEnd/TextResources/Korean/ChatbookStrings.tr | 1 + FrontEnd/TextResources/Spanish/ChatbookStrings.tr | 1 + Source/Chatbook/ChatModes/UI.wl | 2 +- 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/FrontEnd/TextResources/ChatbookStrings.tr b/FrontEnd/TextResources/ChatbookStrings.tr index 7016efda..854b6c3b 100644 --- a/FrontEnd/TextResources/ChatbookStrings.tr +++ b/FrontEnd/TextResources/ChatbookStrings.tr @@ -216,6 +216,7 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAsTooltip" -> "Share response\[Ellipsis]", "WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", "WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", "WorkspaceOutputRaftShareAsPDF" -> "PDF", diff --git a/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr b/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr index d99f846d..530899d5 100644 --- a/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr +++ b/FrontEnd/TextResources/ChineseTraditional/ChatbookStrings.tr @@ -216,6 +216,7 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAsTooltip" -> "Share response\[Ellipsis]", "WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", "WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", "WorkspaceOutputRaftShareAsPDF" -> "PDF", diff --git a/FrontEnd/TextResources/French/ChatbookStrings.tr b/FrontEnd/TextResources/French/ChatbookStrings.tr index 92e1c3ec..e45e6b23 100644 --- a/FrontEnd/TextResources/French/ChatbookStrings.tr +++ b/FrontEnd/TextResources/French/ChatbookStrings.tr @@ -216,6 +216,7 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAsTooltip" -> "Share response\[Ellipsis]", "WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", "WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", "WorkspaceOutputRaftShareAsPDF" -> "PDF", diff --git a/FrontEnd/TextResources/Japanese/ChatbookStrings.tr b/FrontEnd/TextResources/Japanese/ChatbookStrings.tr index fd5ffc41..ace7f97e 100644 --- a/FrontEnd/TextResources/Japanese/ChatbookStrings.tr +++ b/FrontEnd/TextResources/Japanese/ChatbookStrings.tr @@ -216,6 +216,7 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAsTooltip" -> "Share response\[Ellipsis]", "WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", "WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", "WorkspaceOutputRaftShareAsPDF" -> "PDF", diff --git a/FrontEnd/TextResources/Korean/ChatbookStrings.tr b/FrontEnd/TextResources/Korean/ChatbookStrings.tr index df81998f..d728a428 100644 --- a/FrontEnd/TextResources/Korean/ChatbookStrings.tr +++ b/FrontEnd/TextResources/Korean/ChatbookStrings.tr @@ -217,6 +217,7 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAsTooltip" -> "Share response\[Ellipsis]", "WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", "WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", "WorkspaceOutputRaftShareAsPDF" -> "PDF", diff --git a/FrontEnd/TextResources/Spanish/ChatbookStrings.tr b/FrontEnd/TextResources/Spanish/ChatbookStrings.tr index 22d7d738..9ab21fe4 100644 --- a/FrontEnd/TextResources/Spanish/ChatbookStrings.tr +++ b/FrontEnd/TextResources/Spanish/ChatbookStrings.tr @@ -216,6 +216,7 @@ "WorkspaceOutputRaftCopyAsPlainText" -> "Plain Text", "WorkspaceOutputRaftCopyAsImage" -> "Image", "WorkspaceOutputRaftRegenerateTooltip" -> "Regenerate response", +"WorkspaceOutputRaftShareAsTooltip" -> "Share response\[Ellipsis]", "WorkspaceOutputRaftShareAs" -> "Share this as\[Ellipsis]", "WorkspaceOutputRaftShareAsCloudDeployment" -> "Cloud Deployment", "WorkspaceOutputRaftShareAsPDF" -> "PDF", diff --git a/Source/Chatbook/ChatModes/UI.wl b/Source/Chatbook/ChatModes/UI.wl index 4f1cac84..18d2c70a 100644 --- a/Source/Chatbook/ChatModes/UI.wl +++ b/Source/Chatbook/ChatModes/UI.wl @@ -1097,7 +1097,7 @@ assistantMessageButtons[ includeFeedback_ ] := assistantMessageButtons[ includeF If[ TrueQ @ includeFeedback, Splice @ { Item[ Spacer[ 0 ], ItemSize -> Fit ], - assistantShareAsActionMenu[ Dynamic[ cell ] ], + Tooltip[ assistantShareAsActionMenu[ Dynamic[ cell ] ], tr[ "WorkspaceOutputRaftShareAsTooltip" ] ], Button[ Tooltip[ $thumbsUpLabel, tr[ "WorkspaceOutputRaftFeedbackTooltip" ] ], ChatbookAction[ "SendFeedback", cell, True ], From 6beafd4701213d334a4e5c0204a20f8ef06adf91 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Thu, 21 Nov 2024 10:03:39 -0500 Subject: [PATCH 7/9] Formatting --- Source/Chatbook/ChatModes/UI.wl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Chatbook/ChatModes/UI.wl b/Source/Chatbook/ChatModes/UI.wl index ec06445f..e94b83f5 100644 --- a/Source/Chatbook/ChatModes/UI.wl +++ b/Source/Chatbook/ChatModes/UI.wl @@ -1196,6 +1196,7 @@ assistantCopyAsActionMenu // endDefinition; (* ::**************************************************************************************************************:: *) (* ::Subsubsection::Closed:: *) +(*assistantShareAsActionMenu*) assistantShareAsActionMenu // beginDefinition; assistantShareAsActionMenu[ Dynamic[ cell_ ] ] := @@ -1259,6 +1260,7 @@ assistantShareAsActionMenu // endDefinition; (* ::**************************************************************************************************************:: *) (* ::Subsubsection::Closed:: *) +(*assistantActionMenuItem*) assistantActionMenuItem // beginDefinition; assistantActionMenuItem // Attributes = { HoldRest }; From 3a9f839cd3b71590001dfeb26864eef8b40f6bfd Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Thu, 21 Nov 2024 11:20:52 -0500 Subject: [PATCH 8/9] Disable share menu for now --- Source/Chatbook/ChatModes/UI.wl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Chatbook/ChatModes/UI.wl b/Source/Chatbook/ChatModes/UI.wl index e94b83f5..1650aba7 100644 --- a/Source/Chatbook/ChatModes/UI.wl +++ b/Source/Chatbook/ChatModes/UI.wl @@ -1096,10 +1096,11 @@ assistantMessageButtons[ includeFeedback_ ] := assistantMessageButtons[ includeF Appearance -> "Suppressed", Method -> "Queued" ], + Item[ Spacer[ 0 ], ItemSize -> Fit ], + (* Waiting for sharing functionality to be implemented: *) + (* Tooltip[ assistantShareAsActionMenu[ Dynamic[ cell ] ], tr[ "WorkspaceOutputRaftShareAsTooltip" ] ], *) If[ TrueQ @ includeFeedback, Splice @ { - Item[ Spacer[ 0 ], ItemSize -> Fit ], - Tooltip[ assistantShareAsActionMenu[ Dynamic[ cell ] ], tr[ "WorkspaceOutputRaftShareAsTooltip" ] ], Button[ Tooltip[ $thumbsUpLabel, tr[ "WorkspaceOutputRaftFeedbackTooltip" ] ], ChatbookAction[ "SendFeedback", cell, True ], From 49de72075ed04a9a9300918fc257e9af8cbf1221 Mon Sep 17 00:00:00 2001 From: Rick Hennigan Date: Thu, 21 Nov 2024 11:28:51 -0500 Subject: [PATCH 9/9] Appease code inspector and spell checker --- Source/Chatbook/ChatModes/UI.wl | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/Source/Chatbook/ChatModes/UI.wl b/Source/Chatbook/ChatModes/UI.wl index 1650aba7..58b9e077 100644 --- a/Source/Chatbook/ChatModes/UI.wl +++ b/Source/Chatbook/ChatModes/UI.wl @@ -181,13 +181,13 @@ newChatButton[ Dynamic[ nbo_ ] ] := {FontColor -> RGBColor["#469ECB"]}, {BaseStyle -> RGBColor["#469ECB"]} ], - hotlabel = toolbarButtonLabel0["New", "New", + hotLabel = toolbarButtonLabel0["New", "New", {FontColor -> RGBColor[1,1,1]}, {BaseStyle -> RGBColor[1,1,1]} ]}, Button[ - toolbarButtonLabel[ lightButton, {label, hotlabel}, "New"], + toolbarButtonLabel[ lightButton, {label, hotLabel}, "New"], clearOverlayMenus @ nbo; NotebookDelete @ Cells @ nbo; removeWorkspaceChatSubDockedCell @ nbo; @@ -254,25 +254,25 @@ toolbarButtonLabel // endDefinition; toolbarButtonLabel0 // beginDefinition; -toolbarButtonLabel0[ iconName_String, labelName_String, {styleopts___}, {gridopts___}] := - toolbarButtonLabel0[ iconName, tr[ "WorkspaceToolbarButtonLabel"<>labelName ], {styleopts}, {gridopts} ]; +toolbarButtonLabel0[ iconName_String, labelName_String, {styleOpts___}, {gridOpts___}] := + toolbarButtonLabel0[ iconName, tr[ "WorkspaceToolbarButtonLabel"<>labelName ], {styleOpts}, {gridOpts} ]; -toolbarButtonLabel0[ iconName_String, None, {styleopts___}, {gridopts___}] := +toolbarButtonLabel0[ iconName_String, None, {styleOpts___}, {gridOpts___}] := Grid[ { { chatbookIcon[ "WorkspaceToolbarIcon"<>iconName, False ] } }, - gridopts, + gridOpts, Spacings -> 0.25, Alignment -> { {Left, Right}, Baseline }, BaselinePosition -> { 1, 1 } ]; -toolbarButtonLabel0[ iconName_String, label_, {styleopts___}, {gridopts___}] := +toolbarButtonLabel0[ iconName_String, label_, {styleOpts___}, {gridOpts___}] := Grid[ { { chatbookIcon[ "WorkspaceToolbarIcon"<>iconName, False ], - Style[ label, $toolbarLabelStyle, styleopts ] + Style[ label, $toolbarLabelStyle, styleOpts ] } }, - gridopts, + gridOpts, Spacings -> 0.25, Alignment -> { {Left, Right}, Baseline }, BaselinePosition -> { 1, 2 } @@ -410,6 +410,8 @@ attachedWorkspaceChatInputCell[ location_String ] := Cell[ (*workspaceChatInitializer*) workspaceChatInitializer // beginDefinition; +(* :!CodeAnalysis::BeginBlock:: *) +(* :!CodeAnalysis::Disable::NoVariables::DynamicModule:: *) workspaceChatInitializer[ expr_ ] := DynamicModule[ { }, @@ -417,6 +419,7 @@ workspaceChatInitializer[ expr_ ] := Initialization :> initializeWorkspaceChat[ ], SynchronousInitialization -> False ]; +(* :!CodeAnalysis::EndBlock:: *) workspaceChatInitializer // endDefinition; @@ -1136,6 +1139,8 @@ $thumbsDownLabel := $thumbsDownLabel = chatbookIcon[ "WorkspaceOutputRaftThumbsD (* ::Subsubsection::Closed:: *) assistantCopyAsActionMenu // beginDefinition; +(* :!CodeAnalysis::BeginBlock:: *) +(* :!CodeAnalysis::Disable::NoVariables::DynamicModule:: *) assistantCopyAsActionMenu[ Dynamic[ cell_ ] ] := DynamicModule[ { Typeset`menuActiveQ = False }, EventHandler[ @@ -1182,7 +1187,7 @@ DynamicModule[ { Typeset`menuActiveQ = False }, ], Background -> White, FrameStyle -> RGBColor[ "#E5E5E5" ], ImageSize -> 158, RoundingRadius -> 4 ], InheritScope -> True, - Initialization :> (True), (* Deinit won't run without an Init *) + Initialization :> (True), (* Deinitialization won't run without an Init *) Deinitialization :> (Typeset`menuActiveQ = False) ], CellTags -> "CustomActionMenu", @@ -1192,6 +1197,7 @@ DynamicModule[ { Typeset`menuActiveQ = False }, PassEventsDown -> True, Method -> "Preemptive", PassEventsUp -> True ]] +(* :!CodeAnalysis::EndBlock:: *) assistantCopyAsActionMenu // endDefinition; @@ -1200,6 +1206,8 @@ assistantCopyAsActionMenu // endDefinition; (*assistantShareAsActionMenu*) assistantShareAsActionMenu // beginDefinition; +(* :!CodeAnalysis::BeginBlock:: *) +(* :!CodeAnalysis::Disable::NoVariables::DynamicModule:: *) assistantShareAsActionMenu[ Dynamic[ cell_ ] ] := DynamicModule[ { Typeset`menuActiveQ = False }, EventHandler[ @@ -1246,7 +1254,7 @@ DynamicModule[ { Typeset`menuActiveQ = False }, ], Background -> White, FrameStyle -> RGBColor[ "#E5E5E5" ], ImageSize -> 158, RoundingRadius -> 4 ], InheritScope -> True, - Initialization :> (True), (* Deinit won't run without an Init *) + Initialization :> (True), (* Deinitialization won't run without an Init *) Deinitialization :> (Typeset`menuActiveQ = False) ], CellTags -> "CustomActionMenu", @@ -1256,6 +1264,7 @@ DynamicModule[ { Typeset`menuActiveQ = False }, PassEventsDown -> True, Method -> "Preemptive", PassEventsUp -> True ]] +(* :!CodeAnalysis::EndBlock:: *) assistantShareAsActionMenu // endDefinition;