mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
refactor: address comments
This commit is contained in:
@@ -128,11 +128,12 @@ export class KiloChatClient {
|
||||
})
|
||||
const next = prev.then(send, send)
|
||||
this.sendQueues.set(req.conversationId, next)
|
||||
void next.finally(() => {
|
||||
const cleanup = () => {
|
||||
if (this.sendQueues.get(req.conversationId) === next) {
|
||||
this.sendQueues.delete(req.conversationId)
|
||||
}
|
||||
})
|
||||
}
|
||||
void next.then(cleanup, cleanup)
|
||||
return next
|
||||
}
|
||||
|
||||
|
||||
@@ -119,11 +119,12 @@ export class KiloChatClient {
|
||||
})
|
||||
const next = prev.then(send, send)
|
||||
this.sendQueues.set(req.conversationId, next)
|
||||
void next.finally(() => {
|
||||
const cleanup = () => {
|
||||
if (this.sendQueues.get(req.conversationId) === next) {
|
||||
this.sendQueues.delete(req.conversationId)
|
||||
}
|
||||
})
|
||||
}
|
||||
void next.then(cleanup, cleanup)
|
||||
return next
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user