diff --git a/static/ui.js b/static/ui.js index 7eec8df..d10f756 100644 --- a/static/ui.js +++ b/static/ui.js @@ -465,6 +465,9 @@ function renderMessages(){ const inner=$('msgInner'); const vis=S.messages.filter(m=>{ if(!m||!m.role||m.role==='tool')return false; + // Keep assistant messages with tool_use content even if they have no text, + // so tool cards can be anchored to their DOM rows on page reload (#140). + if(m.role==='assistant'&&Array.isArray(m.content)&&m.content.some(p=>p&&p.type==='tool_use'))return true; return msgContent(m)||m.attachments?.length; }); $('emptyState').style.display=vis.length?'none':'';