Skip to content

Commit 620e367

Browse files
committed
linter
1 parent 8f91c72 commit 620e367

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

apps/web/server.ts

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ app.prepare().then(() => {
6161
res.write(':\n\n')
6262

6363
// Force flush the written data
64-
if (typeof res.flush === 'function') {
65-
res.flush();
64+
const response = res as unknown as { flush?: () => void };
65+
if (typeof response.flush === 'function') {
66+
response.flush();
6667
}
6768

6869
// Create client object
@@ -71,8 +72,9 @@ app.prepare().then(() => {
7172
try {
7273
console.log('Sending message to client:', data.substring(0, 100))
7374
res.write(`data: ${data}\n\n`)
74-
if (typeof res.flush === 'function') {
75-
res.flush();
75+
const response = res as unknown as { flush?: () => void };
76+
if (typeof response.flush === 'function') {
77+
response.flush();
7678
}
7779
} catch (error) {
7880
console.error('Error sending message:', error)
@@ -89,8 +91,9 @@ app.prepare().then(() => {
8991
const keepAlive = setInterval(() => {
9092
try {
9193
res.write(':\n\n')
92-
if (typeof res.flush === 'function') {
93-
res.flush();
94+
const response = res as unknown as { flush?: () => void };
95+
if (typeof response.flush === 'function') {
96+
response.flush();
9497
}
9598
} catch (error) {
9699
console.error('Error sending heartbeat:', error)
@@ -154,13 +157,7 @@ app.prepare().then(() => {
154157
}
155158
} else {
156159
// Forward message to MCPServer
157-
await mcpServer.handleMessage(JSON.stringify(message), {
158-
send: (response) => {
159-
for (const client of sseClients) {
160-
client.send(response);
161-
}
162-
}
163-
});
160+
await mcpServer.handleMessage(JSON.stringify(message));
164161
}
165162

166163
// Send HTTP response
@@ -186,11 +183,7 @@ app.prepare().then(() => {
186183
req.on('end', async () => {
187184
try {
188185
const message: JSONRPCMessage = JSON.parse(body)
189-
await mcpServer.handleMessage(JSON.stringify(message), {
190-
send: (response) => {
191-
sseClients.forEach(client => client.send(response))
192-
}
193-
});
186+
await mcpServer.handleMessage(JSON.stringify(message));
194187
res.writeHead(200)
195188
res.end()
196189
} catch (error) {

apps/web/src/components/tools/auth0/dashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ export default function Auth0Dashboard() {
501501
<CardTitle>Chat Assistant</CardTitle>
502502
<CollapsibleTrigger asChild>
503503
<Button variant="ghost" size="sm">
504-
{isOpen ? <ChevronUp className="h-4 w-4" /> : <ChevronDown className="h-4 w-4" />}
504+
<ChevronDown className="h-4 w-4" />
505505
</Button>
506506
</CollapsibleTrigger>
507507
</div>

0 commit comments

Comments
 (0)