File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -346,8 +346,6 @@ async function readBrowserTelemetry(
346346 if ( rawError ) return errorResponse ( `error: ${ rawError } ` ) ;
347347 }
348348
349- // Single-line JSON rather than the pretty-printed house helpers: a page
350- // carries up to 100 events and indentation would inflate the token cost.
351349 const serializedResponse = JSON . stringify ( response ) ;
352350 if (
353351 params . compact === false &&
Original file line number Diff line number Diff line change 55 type McpDependencies ,
66} from "@/lib/mcp/dependencies" ;
77import { longOperationOptions } from "@/lib/mcp/request-options" ;
8- import { throwToolError } from "@/lib/mcp/responses" ;
8+ import { jsonResponse , throwToolError } from "@/lib/mcp/responses" ;
99import {
1010 projectForOperation ,
1111 projectSelectionInputSchema ,
@@ -102,23 +102,12 @@ export function registerShellTool(
102102 ? Buffer . from ( result . stderr_b64 , "base64" ) . toString ( "utf-8" )
103103 : "" ;
104104
105- return {
106- content : [
107- {
108- type : "text" ,
109- text : JSON . stringify (
110- {
111- exit_code : result . exit_code ,
112- duration_ms : result . duration_ms ,
113- stdout,
114- stderr,
115- } ,
116- null ,
117- 2 ,
118- ) ,
119- } ,
120- ] ,
121- } ;
105+ return jsonResponse ( {
106+ exit_code : result . exit_code ,
107+ duration_ms : result . duration_ms ,
108+ stdout,
109+ stderr,
110+ } ) ;
122111 } catch ( error ) {
123112 throwToolError ( "exec_command" , "exec" , error ) ;
124113 }
You can’t perform that action at this time.
0 commit comments