Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DarkModeSupport/StyleSheets/Chatbook.nb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Notebook[
],
Cell[
StyleData["ChatStyleSheetInformation"],
TaggingRules -> <|"StyleSheetVersion" -> "2.6.0.3973832805"|>
TaggingRules -> <|"StyleSheetVersion" -> "2.5.21.3975037993"|>
],
Cell[
StyleData["NotebookAssistant`Text"],
Expand Down
2 changes: 1 addition & 1 deletion DarkModeSupport/StyleSheets/Wolfram/WorkspaceChat.nb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Notebook[
Cell[StyleData["CellExpression"], Selectable -> True],
Cell[
StyleData["WorkspaceChatStyleSheetInformation"],
TaggingRules -> <|"WorkspaceChatStyleSheetVersion" -> "2.6.0.3973832805"|>
TaggingRules -> <|"WorkspaceChatStyleSheetVersion" -> "2.5.21.3975037993"|>
],
Cell[
StyleData["AttachedCell"],
Expand Down
30 changes: 24 additions & 6 deletions DarkModeSupport/TextResources/ChatbookResources.tr
Original file line number Diff line number Diff line change
Expand Up @@ -9843,25 +9843,25 @@ VX/aMEEQzrerjFhhelYAzofFB3r8AgApYdcE

"NotebookAssistantSideBarCell" -> Cell[BoxData[{
DynamicBox[ToBoxes[Needs["Wolfram`Chatbook`" -> None]; RawBoxes[
Symbol["Wolfram`Chatbook`ChatbookAction"]["MakeSideBarChatDockedCell"]],
Symbol["Wolfram`Chatbook`ChatbookAction"]["MakeSidebarChatDockedCell"]],
StandardForm],
DestroyAfterEvaluation->True], "\n",
DynamicBox[ToBoxes[Needs["Wolfram`Chatbook`" -> None]; RawBoxes[
Symbol["Wolfram`Chatbook`ChatModes`Common`sideBarChatInputCell"][]],
Symbol["Wolfram`Chatbook`ChatModes`Common`sidebarChatInputCell"][]],
StandardForm],
DestroyAfterEvaluation->True]}],
Editable->True,
Selectable->False,
CellMargins->{{0, 0}, {0, 0}},
Initialization:>(AttachCell[
EvaluationCell[],
Cell["", CellTags -> "NotebookAssistantSideBarAttachedHelperCell"], {
Cell["", CellTags -> "NotebookAssistantSidebarAttachedHelperCell"], {
Left, Top}, 0, {Left, Top}]; Needs["Wolfram`Chatbook`" -> None];
CurrentValue[
EvaluationCell[], TaggingRules] = <|
"ChatNotebookSettings" ->
Wolfram`Chatbook`ChatModes`ShowNotebookAssistance`Private`$\
notebookAssistanceSideBarSettings, "ConversationTitle" -> ""|>),
notebookAssistanceSidebarSettings, "ConversationTitle" -> ""|>),
CellFrameMargins->0,
LineSpacing->{1, 0},
LineIndent->0,
Expand All @@ -9871,8 +9871,26 @@ notebookAssistanceSideBarSettings, "ConversationTitle" -> ""|>),
GrayLevel[0.95],
RGBColor[0.1882352, 0.2078431, 0.2274509]],
CellTags->
"NotebookAssistantSideBarCell",ExpressionUUID->"f07e5bee-db7b-e54a-a82d-\
748107c91735"]
"NotebookAssistantSidebarCell",ExpressionUUID->"893a0b21-0cc0-da46-8926-\
d218671de1a9"],

"SidebarIconHide" -> (GraphicsBox[{
Thickness[0.125],
FaceForm[{#,
Opacity[1.]}],
FilledCurveBox[{{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {1,
3, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3,
3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {0, 1,
0}}}, CompressedData["
1:eJxTTMoPSmVmYGBgBGJ1IGZiAIMF1UZyDkA64UPrJ3sgvUXzF5ivUHDuHTKf
YfLKJ/ZI6htcbtwB8huaFc/JgvgHFk26BpIX5feG8C/mXwbxl/w5LoPMj/ng
isJ/c/eQNLL+C81x0kjmM0zwYxAA8QWKw7nA4j4tYHfC5Bn+fvtgj6SfIe3q
W3sk8xku73mJwrdf8hSFv6b7IYr+bRfvoJh/JeyCPZL/YXxY+MDUw8KvYW0E
2J0bkv7zOyDJ73gD8RdM/41ZajLI/AiDLFlk9TOeQMKZoXYd2N4Zk6DxoHn6
HTIfFh4w9bDw0lh5WcgBKTxh8i8MIfbC9PechdgL48PiF6YeFv8w98H4MPfD
1MP8l+B2RQjZ/yjpCwBvF7ac
"]]}, AspectRatio -> Automatic, BaselinePosition -> (Center -> Center),
ImageSize -> {9., 9.}, PlotRange -> {{-0.5, 8.5}, {-0.5, 8.5}}]& )
}
@|
@|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
DynamicBox[
ToBoxes[
Needs[ "Wolfram`Chatbook`" -> None ];
RawBoxes @ Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "MakeSideBarChatDockedCell" ],
RawBoxes @ Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "MakeSidebarChatDockedCell" ],
StandardForm ],
DestroyAfterEvaluation -> True
],
"\n",
DynamicBox[
ToBoxes[
Needs[ "Wolfram`Chatbook`" -> None ];
RawBoxes @ Symbol[ "Wolfram`Chatbook`ChatModes`Common`sideBarChatInputCell" ][ ],
RawBoxes @ Symbol[ "Wolfram`Chatbook`ChatModes`Common`sidebarChatInputCell" ][ ],
StandardForm ],
DestroyAfterEvaluation -> True
]
Expand All @@ -23,13 +23,13 @@
Background -> color @ "NA_ChatInputFieldBackgroundArea", (* this colors the entire initial sidebar as gray to make it easier to see *)
CellFrameMargins -> 0,
CellMargins -> { { 0, 0 }, { 0, 0 } },
CellTags -> "NotebookAssistantSideBarCell",
CellTags -> "NotebookAssistantSidebarCell",
Editable -> True,
FontSize -> 0.5, (* needed to workaround line wrapping issue where newlines are given their full line-height based on the FontSize *)
Initialization :> (
AttachCell[ EvaluationCell[ ], Cell[ "", CellTags -> "NotebookAssistantSideBarAttachedHelperCell" ], { Left, Top }, 0, { Left, Top } ];
AttachCell[ EvaluationCell[ ], Cell[ "", CellTags -> "NotebookAssistantSidebarAttachedHelperCell" ], { Left, Top }, 0, { Left, Top } ];
Needs[ "Wolfram`Chatbook`" -> None ];
CurrentValue[ EvaluationCell[ ], TaggingRules ] = <| "ChatNotebookSettings" -> Wolfram`Chatbook`ChatModes`ShowNotebookAssistance`Private`$notebookAssistanceSideBarSettings, "ConversationTitle" -> "" |>),
CurrentValue[ EvaluationCell[ ], TaggingRules ] = <| "ChatNotebookSettings" -> Wolfram`Chatbook`ChatModes`ShowNotebookAssistance`Private`$notebookAssistanceSidebarSettings, "ConversationTitle" -> "" |>),

Check notice on line 32 in Developer/Resources/FrontEndResources/SideBarChat/NotebookAssistantSideBarCell.wl

View workflow job for this annotation

GitHub Actions / Build

CodeInspector/PrivateContextSymbol

The symbol ``Wolfram`Chatbook`ChatModes`ShowNotebookAssistance`Private`$notebookAssistanceSidebarSettings`` is in a private context (L32,C85) (CodeInspectionFileIssue/PrivateContextSymbol:1379246342)
LineIndent -> 0,
LineSpacing -> { 1, 0 },
Magnification -> 1.,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Function[Evaluate @ ToBoxes @
Graphics[
{
Thickness @ 0.125,
FaceForm @ {#, Opacity @ 1.},
FilledCurve[
{
{
{1, 4, 3},
{1, 3, 3},
{1, 3, 3},
{0, 1, 0},
{0, 1, 0},
{1, 3, 3},
{1, 3, 3},
{1, 3, 3},
{0, 1, 0},
{0, 1, 0},
{1, 3, 3},
{1, 3, 3},
{0, 1, 0},
{0, 1, 0},
{1, 3, 3},
{1, 3, 3},
{0, 1, 0},
{0, 1, 0}
}
},
{
{
{7.549299716949463, 1.1576999425888062},
{7.7442997097969055, 0.9626999497413635},
{7.7442997097969055, 0.6456999778747559},
{7.549299716949463, 0.45069992542266846},
{7.451299719512463, 0.3526999354362488},
{7.3232997208833694, 0.30369991064071655},
{7.195299685001373, 0.30369991064071655},
{7.06829971075058, 0.30369991064071655},
{6.940299689769745, 0.3526999354362488},
{6.842299699783325, 0.45069992542266846},
{4.000299692153931, 3.292699933052063},
{1.157299518585205, 0.45069992542266846},
{1.0602998733520508, 0.3526999354362488},
{0.9322996139526367, 0.30369991064071655},
{0.8042998313903809, 0.30369991064071655},
{0.6762995719909668, 0.30369991064071655},
{0.5482997894287109, 0.3526999354362488},
{0.4502997398376465, 0.45069992542266846},
{0.25529956817626953, 0.6456999778747559},
{0.25529956817626953, 0.9626999497413635},
{0.4502997398376465, 1.1576999425888062},
{3.293299674987793, 3.9996999502182007},
{0.4502997398376465, 6.842699885368347},
{0.25529956817626953, 7.037700057029724},
{0.25529956817626953, 7.353700041770935},
{0.4502997398376465, 7.549700140953064},
{0.6462998390197754, 7.744699835777283},
{0.9622998237609863, 7.744699835777283},
{1.157299518585205, 7.549700140953064},
{4.000299692153931, 4.706699967384338},
{6.842299699783325, 7.549700140953064},
{7.037299752235413, 7.744699835777283},
{7.35429972410202, 7.744699835777283},
{7.549299716949463, 7.549700140953064},
{7.7442997097969055, 7.353700041770935},
{7.7442997097969055, 7.037700057029724},
{7.549299716949463, 6.842699885368347},
{4.707299709320068, 3.9996999502182007},
{7.549299716949463, 1.1576999425888062}
}
}
]
},
AspectRatio -> Automatic,
BaselinePosition -> (Center -> Center),
ImageSize -> {9., 9.},
PlotRange -> {{-0.5, 8.5}, {-0.5, 8.5}}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fails = DeleteCases[ fails, { _, "Notebook" | "PrintTemporary" | "CellExpression
(* 3. Only include styles that aren't included in, or are modified from, CoreExtensions.nb. Directly inherit within CoreExtensions.nb. *)
(* 4. CellFrameLabels is not supported by inline cells so use AttachCell instead *)

SideBarCoreExtensionCells[ ] :=
SidebarCoreExtensionCells[ ] :=
MapThread[
Module[ { b, a, optionsList },
b = Lookup[ Lookup[ before, #1 ], #2 ];
Expand Down Expand Up @@ -104,7 +104,7 @@ MapThread[
Switch[ #2,
"AssistantMessageBox", (* the FrameBox is effecively the same as in WorkspaceChat.nb, with added ImageMargins because we use an Overlay to add the icon *)
Cell[
StyleData[ "NotebookAssistant`SideBar`AssistantMessageBox" ], (* no need to inherit StyleData as this only defines the DisplayFunction *)
StyleData[ "NotebookAssistant`Sidebar`AssistantMessageBox" ], (* no need to inherit StyleData as this only defines the DisplayFunction *)
TemplateBoxOptions -> {
DisplayFunction -> Function @ Evaluate @ OverlayBox[
{
Expand Down Expand Up @@ -156,7 +156,7 @@ MapThread[

"UserMessageBox",
Cell[
StyleData[ "NotebookAssistant`SideBar`UserMessageBox" ], (* no need to inherit StyleData as this only defines the DisplayFunction *)
StyleData[ "NotebookAssistant`Sidebar`UserMessageBox" ], (* no need to inherit StyleData as this only defines the DisplayFunction *)
TemplateBoxOptions -> {
DisplayFunction -> Function @ Evaluate @ OverlayBox[
{
Expand Down Expand Up @@ -196,9 +196,9 @@ MapThread[
_,
Cell[
StyleData[
"NotebookAssistant`SideBar`" <> StringReplace[ #2, StartOfString ~~ "WorkspaceChat" -> "" ],
"NotebookAssistant`Sidebar`" <> StringReplace[ #2, StartOfString ~~ "WorkspaceChat" -> "" ],
Which[
#2 === "WorkspaceChatToolbarTitle", StyleDefinitions -> StyleData[ "NotebookAssistant`SideBar`ToolbarButtonLabel" ],
#2 === "WorkspaceChatToolbarTitle", StyleDefinitions -> StyleData[ "NotebookAssistant`Sidebar`ToolbarButtonLabel" ],
a === { }, Sequence @@ { },
True, StyleDefinitions -> StyleData[ #2 ] ] ],
Sequence @@ optionsList ]
Expand Down
6 changes: 3 additions & 3 deletions Developer/StylesheetBuilder.wl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ $iconDirectory = FileNameJoin @ { $assetLocation, "Icons" };
$ninePatchDirectory = FileNameJoin @ { $assetLocation, "NinePatchImages" };
$styleDataFile = FileNameJoin @ { $assetLocation, "Styles.wl" };
$workspaceStyleDataFile = FileNameJoin @ { $assetLocation, "WorkspaceStyles.wl" };
$sideBarDataFile = FileNameJoin @ { $assetLocation, "SideBarStyles.wl" };
$sidebarDataFile = FileNameJoin @ { $assetLocation, "SidebarStyles.wl" };
$pacletDirectory = DirectoryName[ $inputFileName, 2 ];
$iconManifestFile = FileNameJoin @ { $pacletDirectory, "Assets", "Icons.wxf" };
$displayFunctionsFile = FileNameJoin @ { $pacletDirectory, "Assets", "DisplayFunctions.wxf" };
Expand Down Expand Up @@ -990,10 +990,10 @@ Module[ { excludedCoreExtensions },
"Text"
];

Get[$sideBarDataFile];
Get[$sidebarDataFile];

Replace[
DeleteCases[ Flatten @ { $styleDataCells, SideBarCoreExtensionCells[ ] }, Cell[ StyleData[ excludedCoreExtensions, ___ ], ___ ] ],
DeleteCases[ Flatten @ { $styleDataCells, SidebarCoreExtensionCells[ ] }, Cell[ StyleData[ excludedCoreExtensions, ___ ], ___ ] ],
Cell[ sd:StyleData[ "ChatInput", ___ ], a___, CellEventActions -> b_List, c___ ] :>
Cell[ sd, a, CellEventActions -> DeleteCases[ b, _[ "MouseEntered" | "MouseExited", _ ] ], c ],
1]
Expand Down
30 changes: 15 additions & 15 deletions FrontEnd/Assets/Extensions/CoreExtensions.nb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Notebook[
Cell["Chatbook Core.nb Extensions", "Title"],
Cell[
StyleData["ChatStyleSheetInformation"],
TaggingRules -> <|"StyleSheetVersion" -> "2.6.0.3973832805"|>
TaggingRules -> <|"StyleSheetVersion" -> "2.5.21.3975037993"|>
],
Cell[
StyleData["NotebookAssistant`Text"],
Expand Down Expand Up @@ -4116,7 +4116,7 @@ Notebook[
}
],
Cell[
StyleData["NotebookAssistant`SideBar`AssistantMessageBox"],
StyleData["NotebookAssistant`Sidebar`AssistantMessageBox"],
TemplateBoxOptions -> {
DisplayFunction ->
(Function[
Expand Down Expand Up @@ -4188,7 +4188,7 @@ Notebook[
],
Cell[
StyleData[
"NotebookAssistant`SideBar`AutoMoveToChatInputField"
"NotebookAssistant`Sidebar`AutoMoveToChatInputField"
],
Initialization :>
(NotebookDelete[EvaluationCell[]];
Expand All @@ -4201,7 +4201,7 @@ Notebook[
],
Cell[
StyleData[
"NotebookAssistant`SideBar`ChatCodeBlockTemplate",
"NotebookAssistant`Sidebar`ChatCodeBlockTemplate",
StyleDefinitions -> StyleData["ChatCodeBlockTemplate"]
],
TemplateBoxOptions -> {
Expand Down Expand Up @@ -4274,7 +4274,7 @@ Notebook[
],
Cell[
StyleData[
"NotebookAssistant`SideBar`ChatInput",
"NotebookAssistant`Sidebar`ChatInput",
StyleDefinitions -> StyleData["ChatInput"]
],
Selectable -> False,
Expand All @@ -4288,7 +4288,7 @@ Notebook[
PaneBoxOptions -> {BaselinePosition -> Baseline}
],
Cell[
StyleData["NotebookAssistant`SideBar`ChatInputField"],
StyleData["NotebookAssistant`Sidebar`ChatInputField"],
CellFrame -> 1,
CellFrameMargins -> {{5, 5}, {0, 0}},
CellFrameColor ->
Expand All @@ -4299,7 +4299,7 @@ Notebook[
],
Cell[
StyleData[
"NotebookAssistant`SideBar`ChatOutput",
"NotebookAssistant`Sidebar`ChatOutput",
StyleDefinitions -> StyleData["ChatOutput"]
],
Selectable -> False,
Expand All @@ -4315,14 +4315,14 @@ Notebook[
],
Cell[
StyleData[
"NotebookAssistant`SideBar`CodeAssistanceWelcomeCell"
"NotebookAssistant`Sidebar`CodeAssistanceWelcomeCell"
],
CellMargins -> {{10, 10}, {30, 10}},
TaggingRules -> <|"ChatNotebookSettings" -> <|"ExcludeFromChat" -> True|>|>,
ShowStringCharacters -> False
],
Cell[
StyleData["NotebookAssistant`SideBar`UserMessageBox"],
StyleData["NotebookAssistant`Sidebar`UserMessageBox"],
TemplateBoxOptions -> {
DisplayFunction ->
(Function[
Expand Down Expand Up @@ -4373,7 +4373,7 @@ Notebook[
],
Cell[
StyleData[
"NotebookAssistant`SideBar`WelcomeToCodeAssistanceSplash"
"NotebookAssistant`Sidebar`WelcomeToCodeAssistanceSplash"
],
TemplateBoxOptions -> {
DisplayFunction ->
Expand Down Expand Up @@ -4450,12 +4450,12 @@ Notebook[
],
Cell[
StyleData[
"NotebookAssistant`SideBar`StyleSheetInformation"
"NotebookAssistant`Sidebar`StyleSheetInformation"
],
TaggingRules -> <|"WorkspaceChatStyleSheetVersion" -> "2.3.48.3959923654"|>
TaggingRules -> <|"WorkspaceChatStyleSheetVersion" -> "2.6.0.3973832805"|>
],
Cell[
StyleData["NotebookAssistant`SideBar`ToolbarButtonLabel"],
StyleData["NotebookAssistant`Sidebar`ToolbarButtonLabel"],
CellMargins -> {{66, 10}, {7, 8}},
LineSpacing -> {1, 3},
TabSpacings -> {2.5},
Expand All @@ -4471,9 +4471,9 @@ Notebook[
],
Cell[
StyleData[
"NotebookAssistant`SideBar`ToolbarTitle",
"NotebookAssistant`Sidebar`ToolbarTitle",
StyleDefinitions ->
StyleData["NotebookAssistant`SideBar`ToolbarButtonLabel"]
StyleData["NotebookAssistant`Sidebar`ToolbarButtonLabel"]
],
FontSize -> 12,
FontColor ->
Expand Down
2 changes: 2 additions & 0 deletions FrontEnd/TextResources/ChatbookStrings.tr
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@
"MenuItemShowNotebookAssistanceInline" -> "Notebook Assistant for Selection",
"MenuItemShowContentSuggestions" -> "AI Content Suggestion",

"SidebarToolbarButtonTooltipHideSidebar" -> "[[Hide notebook assistant]]",

"WorkspaceWindowTitle" -> "Notebook Assistant",
"WorkspaceToolbarButtonLabelHistory" -> "History",
"WorkspaceToolbarButtonLabelSources" -> "Sources",
Expand Down
2 changes: 2 additions & 0 deletions FrontEnd/TextResources/ChineseSimplified/ChatbookStrings.tr
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@
"MenuItemShowNotebookAssistanceInline" -> "\:4E3A\:6240\:9009\:5185\:5BB9\:5BFB\:6C42\:7B14\:8BB0\:672C\:52A9\:624B\:7684\:5E2E\:52A9",
"MenuItemShowContentSuggestions" -> "AI \:5185\:5BB9\:5EFA\:8BAE",

"SidebarToolbarButtonTooltipHideSidebar" -> "[[Hide notebook assistant]]",

"WorkspaceWindowTitle" -> "\:7B14\:8BB0\:672C\:52A9\:624B",
"WorkspaceToolbarButtonLabelHistory" -> "\:5386\:53F2\:8BB0\:5F55",
"WorkspaceToolbarButtonLabelSources" -> "\:8D44\:6E90",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@
"MenuItemShowNotebookAssistanceInline" -> "\:91DD\:5C0D\:9078\:53D6\:90E8\:5206\:7684\:7B46\:8A18\:672C\:5C0F\:5E6B\:624B",
"MenuItemShowContentSuggestions" -> "AI \:5167\:5BB9\:5EFA\:8B70",

"SidebarToolbarButtonTooltipHideSidebar" -> "[[Hide notebook assistant]]",

"WorkspaceWindowTitle" -> "\:7B46\:8A18\:672C\:5C0F\:5E6B\:624B",
"WorkspaceToolbarButtonLabelHistory" -> "\:6B77\:53F2\:8A18\:9304",
"WorkspaceToolbarButtonLabelSources" -> "\:8CC7\:6E90",
Expand Down
Loading
Loading