@@ -31,7 +36,7 @@ export function registerGetErrorsTool(
...
@@ -31,7 +36,7 @@ export function registerGetErrorsTool(
'get_errors',
'get_errors',
{
{
description:
description:
'Get the current error state of the app when rendered in the browser, including any build or runtime errors with source-mapped stack traces',
'Get the current error state from the Next.js dev server, including Next.js global errors (e.g., next.config validation), browser runtime errors, and build errors with source-mapped stack traces',
inputSchema:{},
inputSchema:{},
},
},
async(_request)=>{
async(_request)=>{
...
@@ -55,18 +60,21 @@ export function registerGetErrorsTool(
...
@@ -55,18 +60,21 @@ export function registerGetErrorsTool(
DEFAULT_BROWSER_REQUEST_TIMEOUT_MS
DEFAULT_BROWSER_REQUEST_TIMEOUT_MS
)
)
consterrorsByUrl=newMap<string,OverlayState>()
// The error state for each route
// key is the route path, value is the error state