Conversation
| } catch { | ||
| // JSON parse failed - likely due to incomplete multi-byte UTF-8 character at chunk boundary | ||
| // Put this chunk back in the buffer and wait for more data | ||
| this.buffer = chunkRaw + '\n\n' + this.buffer; |
There was a problem hiding this comment.
match[2] is the end of the chunkRaw.
If match[2] can't be parsed, adding it back to the buffer followed by '\n\n' will keep it broken.
Let's discuss about this
There was a problem hiding this comment.
this code is wrapped in another loop, . So, as you said match[2] is the last token for this buffer but we get new data since we are in the loop.
marcomura
left a comment
There was a problem hiding this comment.
Based on how Rovo Dev responds, this change should not be necessary.
Let's discuss it.
|
My thought here is that this should be solved at the Rovo Dev Server layer, not at the client level... but that's just a first impression. Worth chatting with Tim Esler on this. |
|
Agree with @bwieger-atlassian-com that any issue in the response should be fixed at Rovo Dev level. However, looking at the telemetry, I don't believe the response is split incorrectly, but I think the tool-response may be responding with a different format than what we are expecting (e.g., string instead of json). |
What Is This Change?
In the process of the backend RovoDev sending a response message and Atlascode receiving the message, the following transformations occur
This sometimes split tokens such as
****tool_name****as***t'andool_name****and this results in Atlascode throwing error and the session failing.A more detailed (a little bit long) discussion about the problem and the solution can be found here.
With this PR, we
How Has This Been Tested?
Basic checks:
npm run lintnpm run testnew testsAdvanced checks:
Recommendations:
Rovo Dev code review: Rovo Dev couldn't review this pull request
Upgrade to Rovo Dev Standard to continue using code review.