Skip to content

fix(client): update response_text after parsing response #1093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lua/CopilotChat/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,6 @@ function Client:ask(prompt, opts)
end

local response_text = response_buffer:tostring()
log.trace('Response text:\n', response_text)
log.debug('Response message:\n', vim.inspect(last_message))

if errored then
error(response_text)
return
Expand All @@ -727,6 +724,7 @@ function Client:ask(prompt, opts)
else
parse_line(response.body)
end
response_text = response_buffer:tostring()
end

if utils.empty(response_text) then
Expand Down
Loading