From 870ebb723f9431210bcf8dac08e6edd9deac48d7 Mon Sep 17 00:00:00 2001 From: jade Date: Wed, 29 Jul 2026 11:35:22 +0900 Subject: [PATCH] fix: hide markdown emphasis markers in chat responses --- dap-gateway/src/main/resources/static/chat.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(); } }