File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ class ShareRenderer {
255255 result += `<div class="tool-label">Output` ;
256256
257257 if ( isLongOutput ) {
258- result += `<button class="tool-expand-btn" onclick="this.closest('. tool-output').classList.toggle('expanded') ">` ;
258+ result += `<button class="tool-expand-btn" data- tool-id=" ${ toolId } ">` ;
259259 result += `<span class="expand-text">Show full output (${ outputLines } lines)</span>` ;
260260 result += `<span class="collapse-text">Show less</span>` ;
261261 result += `</button>` ;
@@ -607,6 +607,18 @@ class ShareRenderer {
607607 } ) ;
608608 } ) ;
609609
610+ // Add event listeners for tool expand buttons
611+ const expandButtons = document . querySelectorAll ( '.tool-expand-btn' ) ;
612+ expandButtons . forEach ( button => {
613+ button . addEventListener ( 'click' , ( e ) => {
614+ e . preventDefault ( ) ;
615+ const toolOutput = button . closest ( '.tool-output' ) ;
616+ if ( toolOutput ) {
617+ toolOutput . classList . toggle ( 'expanded' ) ;
618+ }
619+ } ) ;
620+ } ) ;
621+
610622 // Add synchronized scrolling for diff views
611623 const diffScrollables = document . querySelectorAll ( '.diff-scrollable' ) ;
612624 diffScrollables . forEach ( scrollable => {
You can’t perform that action at this time.
0 commit comments