From e2c6395a9abd208827f30b32086edd64f3c8f193 Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 19 May 2026 12:27:39 +0900 Subject: [PATCH] Hide PDF download button in user messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 사용자가 업로드한 PDF는 이미 갖고 있으므로 저장 버튼 불필요. renderMarkdown/renderLinkButton에 hideDownload 옵션 추가, 유저 메시지 렌더링 시 적용. 미리보기 버튼은 유지. Co-Authored-By: Claude Sonnet 4.6 --- web-ui/index.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/web-ui/index.html b/web-ui/index.html index fcfc914..95aa246 100644 --- a/web-ui/index.html +++ b/web-ui/index.html @@ -4735,7 +4735,7 @@ function renderChatMessages() {
${msg.role === 'user' ? 'U' : ''}
${msg.role === 'user' ? 'You' : (msg.mode === 'agentic' ? 'CherryClaw (Agent)' : 'CherryClaw')}
- ${msg.role === 'ai' ? renderAssistantContent(msg.content) : `
${renderMarkdown(msg.display !== undefined ? msg.display : msg.content)}
`} + ${msg.role === 'ai' ? renderAssistantContent(msg.content) : `
${renderMarkdown(msg.display !== undefined ? msg.display : msg.content, { hideDownload: true })}
`} ${msg.role === 'ai' ? renderArtifacts(msg.artifacts) : ''} ${msg.role === 'ai' ? renderFileDownloads(msg.steps, msg.processEntries, msg.content) : ''} ${msg.role === 'ai' && msg.processEntries && msg.processEntries.length ? renderProcessPill(msg.processEntries) : ''} @@ -8498,7 +8498,8 @@ function _normalizeFileUrl(url) { return url; } -function _renderLinkButton(text, url) { +function _renderLinkButton(text, url, opts) { + var hideDownload = opts && opts.hideDownload; url = _normalizeFileUrl(url); var fileExts = ['.pptx','.pdf','.xlsx','.xls','.docx','.doc','.zip','.csv','.mp4','.mp3']; var isDownload = fileExts.some(function(ext) { return text.toLowerCase().endsWith(ext); }) @@ -8523,7 +8524,7 @@ function _renderLinkButton(text, url) { + '' + '📄 ' + text + '' + '' - + '⬇ 저장' + + (hideDownload ? '' : '⬇ 저장') + '
' + '