File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1568,13 +1568,25 @@ <h3 class="text-lg font-semibold mb-4 text-gray-800"><i
15681568 body . style . display = 'none' ; // Collapse by default
15691569
15701570 const argsDiv = document . createElement ( 'div' ) ;
1571- argsDiv . innerHTML = `<strong>Args:</strong> <pre class="text-xs mt-1 bg-gray-100 p-2 rounded">${ tc . function . arguments } </pre>` ;
1571+ const argsLabel = document . createElement ( 'strong' ) ;
1572+ argsLabel . textContent = 'Args:' ;
1573+ const argsPre = document . createElement ( 'pre' ) ;
1574+ argsPre . className = 'text-xs mt-1 bg-gray-100 p-2 rounded whitespace-pre-wrap' ;
1575+ argsPre . textContent = tc . function . arguments ;
1576+ argsDiv . appendChild ( argsLabel ) ;
1577+ argsDiv . appendChild ( argsPre ) ;
15721578 body . appendChild ( argsDiv ) ;
15731579
15741580 if ( tc . result ) {
15751581 const resultDiv = document . createElement ( 'div' ) ;
15761582 resultDiv . className = 'tool-result' ;
1577- resultDiv . innerHTML = `<strong>Result:</strong> ${ tc . result } ` ;
1583+ const resultLabel = document . createElement ( 'strong' ) ;
1584+ resultLabel . textContent = 'Result:' ;
1585+ const resultPre = document . createElement ( 'pre' ) ;
1586+ resultPre . className = 'mt-1 p-2 bg-gray-50 rounded border border-gray-100 overflow-x-auto font-mono text-xs whitespace-pre-wrap' ;
1587+ resultPre . textContent = tc . result ;
1588+ resultDiv . appendChild ( resultLabel ) ;
1589+ resultDiv . appendChild ( resultPre ) ;
15781590 body . appendChild ( resultDiv ) ;
15791591 }
15801592
You can’t perform that action at this time.
0 commit comments