comparison src/chat.html.luan @ 25:3a80ddafe5a4

courses work
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 01 Aug 2025 00:33:51 -0600
parents 87fe70201aa8
children 176a182c02cf
comparison
equal deleted inserted replaced
24:87fe70201aa8 25:3a80ddafe5a4
15 return function() 15 return function()
16 local user = current_user() 16 local user = current_user()
17 if user == nil then return end 17 if user == nil then return end
18 local chat_id = Http.request.parameters.chat or error() 18 local chat_id = Http.request.parameters.chat or error()
19 local chat = get_chat_by_id(chat_id) or error() 19 local chat = get_chat_by_id(chat_id) or error()
20 local added_message = chat.init_ai()
20 Io.stdout = Http.response.text_writer() 21 Io.stdout = Http.response.text_writer()
21 %> 22 %>
22 <!doctype html> 23 <!doctype html>
23 <html lang="en"> 24 <html lang="en">
24 <head> 25 <head>
88 <button onclick="closeModal(this)">Close</button> 89 <button onclick="closeModal(this)">Close</button>
89 </div> 90 </div>
90 </dialog> 91 </dialog>
91 <script> 92 <script>
92 handleMarkdown(); 93 handleMarkdown();
94 <% if added_message then %>
95 playLastMessage();
96 <% end %>
93 </script> 97 </script>
94 </body> 98 </body>
95 </html> 99 </html>
96 <% 100 <%
97 end 101 end