Skip to content

Fix html content detection regex to not include markdown autolinks#3720

Merged
zanesq merged 1 commit intomainfrom
zane/fix-agent-code-response
Jul 30, 2025
Merged

Fix html content detection regex to not include markdown autolinks#3720
zanesq merged 1 commit intomainfrom
zane/fix-agent-code-response

Conversation

@zanesq
Copy link
Collaborator

@zanesq zanesq commented Jul 29, 2025

The html detection regex was too broad and it was catching autolinks inside markdown and rendering it as a code block. Also added support for various edge cases for rendering messages.

fixes #3652

Bonus: added tests with vitest to kick off our unit testing 🎉

…nd email addresses causing rendering messages in code blocks. Also added tests with vitest
Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

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

very nice - love the tests, any tips on how to manually validate this if needed?
I know I have seen this for a while.

@zanesq
Copy link
Collaborator Author

zanesq commented Jul 30, 2025

I manually tested it by asking goose to respond with each rendering case in a dev build and verified the messages are rendering properly.

@zanesq zanesq merged commit f47836b into main Jul 30, 2025
8 checks passed
@zanesq zanesq deleted the zane/fix-agent-code-response branch July 30, 2025 16:40
michaelneale added a commit that referenced this pull request Jul 31, 2025
* main:
  Remove unused Memory Mode / Computer-Controller Mode code (#3743)
  docs: Add Neon MCP Server tutorial (#3639)
  Update OSX codesigning and notarization (#3658)
  Fix slow typing in chat input with long running sessions (#3722)
  Fix html content detection regex to not include markdown autolinks (#3720)
  Must have missed this one (#3733)
  Ok, well, that got out of hand (#3718)
  feat: openrouter out of the box experience for goose installations (#3507)
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.

Claude 4 responding with response in markdown block occasionally

2 participants