Skip to content
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

Cody: Bot response multiplexer publishes, then completes turns #70

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

dominiccooney
Copy link
Contributor

The LLM interaction pushes text to the bot response multiplexer without waiting for the publishing to complete. If the turn ends before publishing is complete, the half-parsed buffer is echoed as-is. The net effect is that </selection> closing tags from fixups are sometimes echoed to the output.

This fixes the problem by chaining a promise for the publications together and waits for them to complete before doing the "turn complete" processing.

Test plan

cd client/cody-shared && pnpm test

Manual test:

This is racy, but you should use Fixup from Inline Instructions, Fixup (Experimental), etc. and check that the word </selection> does not appear in the output.

Copy link
Contributor

@abeatrix abeatrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. everything works as expected with the new change and the stop generating button still works with chat and inline chat.

edit: also confirmed that the fixup output does not contain in the output

@dominiccooney dominiccooney merged commit 67454b4 into main Jul 14, 2023
4 checks passed
@dominiccooney dominiccooney deleted the dpc/racy-publish branch July 14, 2023 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants