mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-06-04 08:00:23 +00:00
Fix tool card duplication: skip detail when snippet equals preview
When tc.snippet === tc.preview (common for no-progress tools where both are set to the same result_snippet), the detail block would show identical content as the header. Skip the detail block in this case. This also handles the reload-path where derived entries get snippet populated but no preview, so displaySnippet falls back to the snippet content for the header — same deduplication applies. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
committed by
nesquena-hermes
parent
0002cda23d
commit
5b3771012a
+1
-1
@@ -6954,7 +6954,7 @@ function buildToolCard(tc){
|
||||
const row=document.createElement('div');
|
||||
row.className='tool-card-row';
|
||||
const icon=toolIcon(tc.name);
|
||||
const hasDetail=tc.snippet||(tc.args&&Object.keys(tc.args).length>0);
|
||||
const hasDetail=(tc.snippet&&tc.snippet!==tc.preview)||(tc.args&&Object.keys(tc.args).length>0);
|
||||
let displaySnippet='';
|
||||
if(tc.snippet){
|
||||
const s=tc.snippet;
|
||||
|
||||
Reference in New Issue
Block a user