113113 copyBtn : document . getElementById ( 'copy-code-btn' ) ,
114114 downloadBtn : document . getElementById ( 'download-code-btn' ) ,
115115 tryJupyterBtn : document . getElementById ( 'try-jupyter-btn' ) ,
116- chatAboutCodeBtn : document . getElementById ( 'chat-about-code-btn' ) ,
117- startAgainBtn : document . getElementById ( 'start-again-btn' ) ,
118- codeChatSection : document . getElementById ( 'code-chat-section' ) ,
119- codeChatContainer : document . getElementById ( 'code-chat-container' ) ,
120- codeChatMessages : document . getElementById ( 'code-chat-messages' ) ,
121- codeChatInput : document . getElementById ( 'code-chat-input' ) ,
122- codeChatSend : document . getElementById ( 'code-chat-send' ) ,
123- closeCodeChatBtn : document . getElementById ( 'close-code-chat-btn' )
116+ startAgainBtn : document . getElementById ( 'start-again-btn' )
124117 } ;
125118
126119 // Check if elements exist (shortcode might not be on this page)
@@ -786,7 +779,6 @@ public class ${formData.agentName.replace(/\s+/g, '')}
786779 const copyBtn = document . getElementById ( 'copy-code-btn' ) ;
787780 const downloadBtn = document . getElementById ( 'download-code-btn' ) ;
788781 const tryJupyterBtn = document . getElementById ( 'try-jupyter-btn' ) ;
789- const chatAboutCodeBtn = document . getElementById ( 'chat-about-code-btn' ) ;
790782
791783 // Attach listeners only if they haven't been attached yet
792784 if ( copyBtn && ! copyBtn . hasAttribute ( 'data-listener-attached' ) ) {
@@ -807,23 +799,6 @@ public class ${formData.agentName.replace(/\s+/g, '')}
807799 tryJupyterBtn . setAttribute ( 'data-listener-attached' , 'true' ) ;
808800 }
809801
810- if ( chatAboutCodeBtn && ! chatAboutCodeBtn . hasAttribute ( 'data-listener-attached' ) ) {
811- chatAboutCodeBtn . addEventListener ( 'click' , function ( event ) {
812- event . preventDefault ( ) ;
813- openCodeChat ( ) ;
814- } ) ;
815- chatAboutCodeBtn . setAttribute ( 'data-listener-attached' , 'true' ) ;
816- }
817-
818- // Add close code chat button listener
819- const closeCodeChatBtn = document . getElementById ( 'close-code-chat-btn' ) ;
820- if ( closeCodeChatBtn && ! closeCodeChatBtn . hasAttribute ( 'data-listener-attached' ) ) {
821- closeCodeChatBtn . addEventListener ( 'click' , function ( event ) {
822- event . preventDefault ( ) ;
823- closeCodeChat ( ) ;
824- } ) ;
825- closeCodeChatBtn . setAttribute ( 'data-listener-attached' , 'true' ) ;
826- }
827802
828803 // Add start again button listener
829804 const startAgainBtn = document . getElementById ( 'start-again-btn' ) ;
@@ -977,7 +952,8 @@ public class ${formData.agentName.replace(/\s+/g, '')}
977952 }
978953
979954 // Code Chat Functions
980- function openCodeChat ( ) {
955+ /* Removed: Code Chat Functions */
956+ /* function openCodeChat() {
981957 const code = elements.codeSection.dataset.code;
982958 if (!code) {
983959 alert('No code available to chat about');
@@ -1014,10 +990,18 @@ public class ${formData.agentName.replace(/\s+/g, '')}
1014990 elements.codeChatSection.scrollIntoView({ behavior: 'smooth' });
1015991 }
1016992
993+ */
994+
1017995 function closeCodeChat ( ) {
1018- elements . codeChatSection . classList . add ( 'agent-builder-hidden' ) ;
1019- elements . codeChatInput . value = '' ;
1020- elements . codeChatSend . disabled = true ;
996+ if ( elements . codeChatSection ) {
997+ elements . codeChatSection . classList . add ( 'agent-builder-hidden' ) ;
998+ }
999+ if ( elements . codeChatInput ) {
1000+ elements . codeChatInput . value = '' ;
1001+ }
1002+ if ( elements . codeChatSend ) {
1003+ elements . codeChatSend . disabled = true ;
1004+ }
10211005
10221006 // Don't reactivate the wizard - it should remain inactive until "Start again" is clicked
10231007 // The wizard was made inactive when code was generated, not when chat was opened
@@ -1031,7 +1015,9 @@ public class ${formData.agentName.replace(/\s+/g, '')}
10311015 elements . codeSection . classList . add ( 'agent-builder-hidden' ) ;
10321016
10331017 // Hide code chat section
1034- elements . codeChatSection . classList . add ( 'agent-builder-hidden' ) ;
1018+ if ( elements . codeChatSection ) {
1019+ elements . codeChatSection . classList . add ( 'agent-builder-hidden' ) ;
1020+ }
10351021
10361022 // Reactivate the initial wizard
10371023 elements . chatContainer . classList . remove ( 'agent-builder-inactive' ) ;
@@ -1076,25 +1062,10 @@ public class ${formData.agentName.replace(/\s+/g, '')}
10761062 elements . chatInput . focus ( ) ;
10771063 }
10781064
1079- function setupCodeChatListeners ( ) {
1080- // Input change listener
1081- elements . codeChatInput . addEventListener ( 'input' , handleCodeChatInputChange ) ;
1082-
1083- // Enter key listener
1084- elements . codeChatInput . addEventListener ( 'keydown' , handleCodeChatKeyDown ) ;
1065+ /* Removed: Code Chat listeners and handlers as feature is removed */
1066+ function setupCodeChatListeners ( ) { /* no-op */ }
10851067
1086- // Prevent search modal on slash
1087- elements . codeChatInput . addEventListener ( 'keydown' , preventSearchModalOnSlash ) ;
1088-
1089- // Send button listener
1090- elements . codeChatSend . addEventListener ( 'click' , handleCodeChatSend ) ;
1091- }
1092-
1093- function removeCodeChatListeners ( ) {
1094- elements . codeChatInput . removeEventListener ( 'input' , handleCodeChatInputChange ) ;
1095- elements . codeChatInput . removeEventListener ( 'keydown' , handleCodeChatKeyDown ) ;
1096- elements . codeChatSend . removeEventListener ( 'click' , handleCodeChatSend ) ;
1097- }
1068+ function removeCodeChatListeners ( ) { /* no-op */ }
10981069
10991070 function handleCodeChatInputChange ( ) {
11001071 const input = elements . codeChatInput . value . trim ( ) ;
0 commit comments