diff --git a/packages/jupyter-ai/src/chat_handler.ts b/packages/jupyter-ai/src/chat_handler.ts index c21b442ce..2ff8b108c 100644 --- a/packages/jupyter-ai/src/chat_handler.ts +++ b/packages/jupyter-ai/src/chat_handler.ts @@ -135,11 +135,11 @@ export class ChatHandler implements IDisposable { if (newMessage.target) { this._messages = this._messages.filter( msg => - msg.id != newMessage.target && - !('reply_to' in msg && msg.reply_to == newMessage.target) + msg.id !== newMessage.target && + !('reply_to' in msg && msg.reply_to === newMessage.target) ); this._pendingMessages = this._pendingMessages.filter( - msg => msg.reply_to != newMessage.target + msg => msg.reply_to !== newMessage.target ); } else { this._messages = [];