Mercurial Hosting > lang
comparison src/lib/ai/claude/Chat.luan @ 7:255c36830154
chat tools
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 18 Jul 2025 17:42:45 -0600 |
parents | 025bb19b65b1 |
children | 46097e607701 |
comparison
equal
deleted
inserted
replaced
6:025bb19b65b1 | 7:255c36830154 |
---|---|
29 who = "You" | 29 who = "You" |
30 else | 30 else |
31 error(role) | 31 error(role) |
32 end | 32 end |
33 local function output(text) | 33 local function output(text) |
34 if not starts_with( text, "[INTERNAL_UPDATE]" ) then | |
35 %> | 34 %> |
36 <h3><%=who%></h3> | 35 <h3><%=who%></h3> |
37 <div role="<%=role%>"><%=html_encode(text)%></div> | 36 <div role="<%=role%>"><%=html_encode(text)%></div> |
38 <% | 37 <% |
39 end | |
40 end | 38 end |
41 local content = message.content or error() | 39 local content = message.content or error() |
42 if type(content) == "string" then | 40 if type(content) == "string" then |
43 output(content) | 41 output(content) |
44 else | 42 else |