Skip to content

Conversation

@35C4n0r
Copy link
Collaborator

@35C4n0r 35C4n0r commented Nov 3, 2025

No description provided.

@35C4n0r 35C4n0r self-assigned this Nov 3, 2025
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

✅ Preview binaries are ready!

To test with modules: agentapi_version = "agentapi_137" or download from: https://github.com/coder/agentapi/releases/tag/agentapi_137

@35C4n0r 35C4n0r requested review from johnstcn and matifali November 3, 2025 13:17
Copy link
Member

@johnstcn johnstcn left a 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?

@35C4n0r 35C4n0r changed the title feat: opencode initial prompt hack test feat: improve opencode parsing Nov 12, 2025
@35C4n0r 35C4n0r changed the title feat: improve opencode parsing feat: fix opencode parsing Nov 12, 2025
@matifali matifali requested a review from Copilot November 12, 2025 04:10
Copy link
Contributor

Copilot AI left a 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 removeOpencodeMessageBox function 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.

@35C4n0r 35C4n0r merged commit 7a9abbb into coder:main Nov 12, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants