diff --git a/dap-gateway/src/main/resources/static/chat.html b/dap-gateway/src/main/resources/static/chat.html index 70eba4a3..aaaf1c1d 100644 --- a/dap-gateway/src/main/resources/static/chat.html +++ b/dap-gateway/src/main/resources/static/chat.html @@ -173,6 +173,10 @@ .replace(/'/g, "'"); } + function removeMarkdownEmphasis(text) { + return text.replace(/\*\*/g, ''); + } + async function sendMessage() { const text = chatInput.value.trim(); if (!text || isLoading) return; @@ -205,6 +209,7 @@ // 5. 스트림 읽기 const reader = response.body.getReader(); const decoder = new TextDecoder("utf-8"); + let responseText = ''; while (true) { const { done, value } = await reader.read(); @@ -215,7 +220,8 @@ for (const line of lines) { if (line.startsWith('data:')) { const data = line.substring(5); - textContainer.innerHTML += escapeHtml(data); + responseText += data; + textContainer.textContent = removeMarkdownEmphasis(responseText); scrollToBottom(); } }