Add files via upload

This commit is contained in:
RT15548
2026-01-02 01:30:24 +08:00
committed by GitHub
parent ca62c39543
commit 9734ca28e4
5 changed files with 456 additions and 429 deletions

View File

@@ -858,7 +858,7 @@ function renderContent(text) {
if (!text) return '';
let html = String(text).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
html = html.replace(/\[(?:image|图片)\s*:\s*([^\]]+)\]/gi, (_, inner) => {
html = html.replace(/\[(?:img|图片)\s*:\s*([^\]]+)\]/gi, (_, inner) => {
const tags = parseImageToken(inner);
if (!tags) return _;
return `<div class="fw-img-slot" data-raw="${encodeURIComponent(inner)}"></div>`;
@@ -900,6 +900,7 @@ function renderContent(text) {
return html;
}
function renderMessages() {
const container = document.getElementById('messages');
const { history, isStreaming, editingIndex } = state;