Skip to content

Commit

Permalink
Pull request #80: Move the Notebook Assistant to the current space if…
Browse files Browse the repository at this point in the history
… needed

Merge in PAC/chatbook from bugfix/453610 to main

* commit '9fcb480a33b21c8cafce057915be64153929adbd':
  Move the Notebook Assistant to the current space if needed
  • Loading branch information
ljdandria authored and rhennigan committed Nov 14, 2024
2 parents af2e673 + 9fcb480 commit 98c8e80
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Source/Chatbook/ChatModes/ShowNotebookAssistance.wl
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,15 @@ attachToLeft[ source_NotebookObject, current_NotebookObject ] := Enclose[
WindowMargins -> { { left - width, Automatic }, { bottom, top } },
WindowSize -> { width, Automatic }
];


If[ (* Starting in Mac 14.2, we can make sure the assistant notebook is on right "space". *)
And[
BoxForm`sufficientVersionQ[14.2],
Internal`CachedSystemInformation["FrontEnd", "OperatingSystem"] === "MacOSX"
],
FE`Evaluate @ Evaluate @ FEPrivate`MoveToActiveDesktop @ current
];

SetSelectedNotebook @ current;
moveToChatInputField[ current, True ];

Expand Down

0 comments on commit 98c8e80

Please sign in to comment.