diff --git a/static/ui.js b/static/ui.js index 45252c98..7f0a191a 100644 --- a/static/ui.js +++ b/static/ui.js @@ -13636,15 +13636,12 @@ function initTreeViews(container){ // Mark as initialised only after we've committed to a render decision wrap.setAttribute('data-tree-init','1'); if(!parsed || typeof parsed!=='object'){ - if(parseFailed){ - const hint=wrap.querySelector('.tree-raw-view'); - if(hint&&!hint.querySelector('.tree-parse-note')){ - const note=document.createElement('div'); - note.className='tree-parse-note'; - note.textContent=t('parse_failed_note')||'parse failed'; - hint.parentNode.insertBefore(note,hint.nextSibling); - } - } + // No tree view for non-object values or unparseable content. LLMs often + // emit JSON fragments (a bare "key": "val" line, snippets with ..., etc.) + // that legitimately fail JSON.parse; surfacing a "parse failed" note for + // those was pure noise. The block still renders as syntax-highlighted raw, + // so just fall through silently. (parseFailed is retained for clarity.) + void parseFailed; return; // leave as raw view } const lineCount=rawText.split('\n').length;