@@ -517,6 +517,48 @@ function createStudyCluesWidget() {
517517 line-height: 1;
518518 }
519519
520+ .studyclues-coach-toggle {
521+ display: flex;
522+ align-items: center;
523+ gap: 6px;
524+ font-size: 12px;
525+ font-weight: 500;
526+ color: #4b5563;
527+ }
528+
529+ .studyclues-coach-toggle input[type="checkbox"] {
530+ appearance: none;
531+ -webkit-appearance: none;
532+ width: 32px;
533+ height: 18px;
534+ border-radius: 9999px;
535+ background: #d1d5db;
536+ cursor: pointer;
537+ position: relative;
538+ transition: background 0.2s;
539+ flex-shrink: 0;
540+ }
541+
542+ .studyclues-coach-toggle input[type="checkbox"]::after {
543+ content: "";
544+ position: absolute;
545+ top: 2px;
546+ left: 2px;
547+ width: 14px;
548+ height: 14px;
549+ border-radius: 50%;
550+ background: #fff;
551+ transition: transform 0.2s;
552+ }
553+
554+ .studyclues-coach-toggle input[type="checkbox"]:checked {
555+ background: #2563eb;
556+ }
557+
558+ .studyclues-coach-toggle input[type="checkbox"]:checked::after {
559+ transform: translateX(14px);
560+ }
561+
520562 .studyclues-messages {
521563 flex: 1;
522564 overflow-y: auto;
@@ -628,6 +670,10 @@ function createStudyCluesWidget() {
628670 chat . innerHTML = `
629671 <div class="studyclues-header">
630672 <span>StudyClues</span>
673+ <label class="studyclues-coach-toggle">
674+ <input type="checkbox" id="studyclues-coach-mode" />
675+ Coach Mode
676+ </label>
631677 <button class="studyclues-close" aria-label="Close chat">✕</button>
632678 </div>
633679 <div class="studyclues-messages"></div>
@@ -644,6 +690,12 @@ function createStudyCluesWidget() {
644690 const messagesEl = chat . querySelector ( ".studyclues-messages" ) ;
645691 const inputEl = chat . querySelector ( ".studyclues-inputbar input" ) ;
646692 const sendBtn = chat . querySelector ( ".studyclues-inputbar button" ) ;
693+ const coachToggle = chat . querySelector ( "#studyclues-coach-mode" ) ;
694+
695+ let coachMode = false ;
696+ coachToggle . addEventListener ( "change" , ( ) => {
697+ coachMode = coachToggle . checked ;
698+ } ) ;
647699
648700 const toggleChat = ( ) => {
649701 chat . classList . toggle ( "open" ) ;
@@ -690,6 +742,7 @@ function createStudyCluesWidget() {
690742 body : JSON . stringify ( {
691743 query,
692744 conversation_id : studyCluesConversationId ,
745+ coachMode,
693746 } ) ,
694747 } ,
695748 ) ;
0 commit comments