format update with prettier
This commit is contained in:
parent
7df1936b3c
commit
a61a1b0df2
1 changed files with 15 additions and 12 deletions
|
|
@ -268,18 +268,21 @@ app.get("/stdio", async (req, res) => {
|
||||||
const stderrHandler = (chunk: Buffer) => {
|
const stderrHandler = (chunk: Buffer) => {
|
||||||
// Only send if the transport exists in our map (meaning it's still active)
|
// Only send if the transport exists in our map (meaning it's still active)
|
||||||
if (webAppTransports.has(webAppTransport.sessionId)) {
|
if (webAppTransports.has(webAppTransport.sessionId)) {
|
||||||
webAppTransport.send({
|
webAppTransport
|
||||||
jsonrpc: "2.0",
|
.send({
|
||||||
method: "notifications/stderr",
|
jsonrpc: "2.0",
|
||||||
params: {
|
method: "notifications/stderr",
|
||||||
content: chunk.toString(),
|
params: {
|
||||||
},
|
content: chunk.toString(),
|
||||||
})
|
},
|
||||||
.catch((error: any) => {
|
})
|
||||||
console.error(`Error sending stderr data to client: ${error.message}`);
|
.catch((error: any) => {
|
||||||
// If we hit an error sending, clean up the transport
|
console.error(
|
||||||
webAppTransports.delete(webAppTransport.sessionId);
|
`Error sending stderr data to client: ${error.message}`,
|
||||||
});
|
);
|
||||||
|
// If we hit an error sending, clean up the transport
|
||||||
|
webAppTransports.delete(webAppTransport.sessionId);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue