Skip to content

Commit 3373e6e

Browse files
committed
fix: update
1 parent 80d8960 commit 3373e6e

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

  • lua/codecompanion/interactions/chat

lua/codecompanion/interactions/chat/init.lua

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ function Chat:_submit_http(payload)
11271127
end,
11281128
on_error = function(err)
11291129
if self.status == CONSTANTS.STATUS_CANCELLING then
1130-
return
1130+
return self:done(output, nil, nil, nil, { status = "stopped" })
11311131
end
11321132
self.status = CONSTANTS.STATUS_ERROR
11331133
log:error("[chat::_submit_http] Error: %s", (err and (err.stderr or err.message)) or "unknown")
@@ -1554,15 +1554,6 @@ function Chat:stop()
15541554

15551555
adapters.call_handler(self.adapter, "on_exit")
15561556
end
1557-
1558-
vim.schedule(function()
1559-
if self.status ~= CONSTANTS.STATUS_CANCELLING then
1560-
return
1561-
end
1562-
1563-
log:debug("Chat request cancelled")
1564-
self:done(nil, nil, nil, nil, { status = "stopped" })
1565-
end)
15661557
end
15671558

15681559
---Close the current chat buffer and clean up any resources

0 commit comments

Comments
 (0)