diff options
| author | Fuwn <[email protected]> | 2025-08-07 16:07:36 +0200 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-08-07 16:07:36 +0200 |
| commit | faa1f1320b9b2dbd5733c25e3b73f3e062a16c27 (patch) | |
| tree | 9553b2c0be54adcbc341238c2b94777b053cfe3f | |
| parent | feat(umapyai): Improve tool handling and web UI integration (diff) | |
| download | umapyai-faa1f1320b9b2dbd5733c25e3b73f3e062a16c27.tar.xz umapyai-faa1f1320b9b2dbd5733c25e3b73f3e062a16c27.zip | |
feat(html): Add Markdown rendering
| -rw-r--r-- | src/umapyai/chat.html | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/umapyai/chat.html b/src/umapyai/chat.html index da48461..e84c74b 100644 --- a/src/umapyai/chat.html +++ b/src/umapyai/chat.html @@ -146,6 +146,8 @@ } } </style> + + <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> </head> <body> @@ -219,13 +221,16 @@ if (message.user) chatbox.innerHTML += "<div class='bubble user'>" + message.text + "</div>"; - else + else { + const html = marked.parse(message.text); + chatbox.innerHTML += "<div class='bubble ai'>" + - message.text + + html + "<div class='source'>" + message.sources + "</div></div>"; + } } chatbox.scrollTop = chatbox.scrollHeight; |