File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,18 @@ const $messageInput = $("#message-input");
6464const $chatHeader = $ (" #chat-header" );
6565
6666$chatButton .on (" click" , function () {
67- $chatWindow .css (" display" , $chatWindow .is (" :visible" ) ? " none" : " flex" );
67+ const isVisible = $chatWindow .is (" :visible" );
68+
69+ // Toggle visibility
70+ $chatWindow .css (" display" , isVisible ? " none" : " flex" );
71+
72+ // Add/remove global chat-open flag
73+ if (isVisible) {
74+ document .body .classList .remove (" chat-open" );
75+ } else {
76+ document .body .classList .add (" chat-open" );
77+ }
78+
6879});
6980
7081function getPilotPrompt () {
@@ -215,13 +226,14 @@ $(document).ready(() => {
215226
216227 $block .hover (
217228 function () {
218- if (! isSelected) {
229+ // Only show highlight and eye icon if chat is open
230+ if (! isSelected && $ (" body" ).hasClass (" chat-open" )) {
219231 $block .addClass (" context-highlight" );
220232 $eyeIcon .show ();
221233 }
222234 },
223235 function () {
224- if (! isSelected) {
236+ if (! isSelected && $ ( " body " ). hasClass ( " chat-open " ) ) {
225237 $block .removeClass (" context-highlight" );
226238 $eyeIcon .hide ();
227239 }
Original file line number Diff line number Diff line change 163163 transition : box-shadow 0.2s ease;
164164}
165165
166- .context-selected {
166+ body . chat-open .context-selected {
167167 box-shadow : 0 0 0 2px # 339af0 ;
168168 background-color : var (--color-secondary-hover );
169169}
You can’t perform that action at this time.
0 commit comments