comparison src/chat.html.luan @ 27:176a182c02cf

add view_course
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 01 Aug 2025 20:08:13 -0600
parents 3a80ddafe5a4
children 99b71a377f2c
comparison
equal deleted inserted replaced
26:d3f5448743bf 27:176a182c02cf
80 <button onclick="doDeleteChat(this)">Delete</button> 80 <button onclick="doDeleteChat(this)">Delete</button>
81 </div> 81 </div>
82 </dialog> 82 </dialog>
83 <dialog system_prompt> 83 <dialog system_prompt>
84 <h2>System Prompt</h2> 84 <h2>System Prompt</h2>
85 <div system_prompt> 85 <pre>
86 <% chat.output_system_prompt() %> 86 <% chat.output_system_prompt() %>
87 </div> 87 </pre>
88 <p><a href="view_course.html?course=<%=chat.course_id%>">View course</a></p>
88 <div buttons> 89 <div buttons>
89 <button onclick="closeModal(this)">Close</button> 90 <button onclick="closeModal(this)">Close</button>
90 </div> 91 </div>
91 </dialog> 92 </dialog>
93 <input name=initialized style="display:none">
92 <script> 94 <script>
93 handleMarkdown(); 95 handleMarkdown();
96 setTimeout(function(){
97 let initialized = document.querySelector('[name=initialized]');
98 if( !initialized.value ) {
99 initialized.value = 'yes';
100 //alert('init');
101 scrollToEnd();
94 <% if added_message then %> 102 <% if added_message then %>
95 playLastMessage(); 103 playLastMessage();
96 <% end %> 104 <% end %>
105 }
106 },10);
97 </script> 107 </script>
98 </body> 108 </body>
99 </html> 109 </html>
100 <% 110 <%
101 end 111 end