-
Notifications
You must be signed in to change notification settings - Fork 90
feat: fix opencode parsing #137
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
feat: fix opencode parsing #137
Conversation
|
✅ Preview binaries are ready! To test with modules: |
johnstcn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still a 'hack' as per the PR title? Has your testing turned up any further information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the parsing logic for opencode message boxes to correctly identify and remove the input UI elements from terminal snapshots.
- Updated the
removeOpencodeMessageBoxfunction to detect the message box boundary more accurately - Changed detection logic from checking for an empty line before
┃┃to finding the first┃┃pattern that doesn't have another┃┃two lines above it - Added test data to verify the fix handles partial renders correctly
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/msgfmt/message_box.go | Fixed opencode message box detection logic to properly identify the start of the input box UI by checking for non-┃┃ content two lines above instead of just an empty line |
| lib/msgfmt/testdata/format/opencode/partial_render/msg.txt | Added test input data showing a partial render of opencode UI with message box |
| lib/msgfmt/testdata/format/opencode/partial_render/expected.txt | Added expected output after message box removal, showing only the content before the input UI |
| lib/httpapi/server.go | Added blank line for improved code readability |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.