fix(extension): bypass 10-item limit of GetAllCascadeTrajectories by utilizing GetDiagnostics
This commit is contained in:
@@ -126,6 +126,22 @@ export function startHttpBridge(ctx: HttpBridgeContext, sdk: any): Promise<numbe
|
||||
return;
|
||||
}
|
||||
|
||||
if (req.method === 'POST' && url.pathname === '/test-rpc') {
|
||||
let rpcBody = '';
|
||||
req.on('data', (c: string) => rpcBody += c);
|
||||
req.on('end', async () => {
|
||||
try {
|
||||
const params = JSON.parse(rpcBody);
|
||||
const result = await sdk.ls.rawRPC(params.method, params.args || {});
|
||||
res.writeHead(200, {'Content-Type': 'application/json'});
|
||||
res.end(typeof result === 'string' ? result : JSON.stringify(result));
|
||||
} catch(e: any) {
|
||||
res.writeHead(500); res.end(e.message);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// GET /ping — health check
|
||||
if (url.pathname === '/ping') {
|
||||
res.writeHead(200); res.end('pong');
|
||||
|
||||
Reference in New Issue
Block a user