File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
templates/typescript/computer-use/tools Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -198,11 +198,11 @@ export class ComputerTool implements BaseAnthropicTool {
198198
199199 if ( scrollDirection === 'down' || scrollDirection === 'up' ) {
200200 const amount = pageDimensions . h * scrollFactor ;
201- console . log ( `Scrolling ${ amount / pageDimensions . h * 100 } % ${ scrollDirection } ` ) ;
201+ console . log ( `Scrolling ${ amount . toFixed ( 2 ) } pixels ${ scrollDirection } ` ) ;
202202 await this . page . mouse . wheel ( 0 , scrollDirection === 'down' ? amount : - amount ) ;
203203 } else {
204204 const amount = pageDimensions . w * scrollFactor ;
205- console . log ( `Scrolling ${ amount / pageDimensions . w * 100 } % ${ scrollDirection } ` ) ;
205+ console . log ( `Scrolling ${ amount . toFixed ( 2 ) } pixels ${ scrollDirection } ` ) ;
206206 await this . page . mouse . wheel ( scrollDirection === 'right' ? amount : - amount , 0 ) ;
207207 }
208208
You can’t perform that action at this time.
0 commit comments