Skip to content

Conversation

chagel
Copy link

@chagel chagel commented Aug 25, 2025

What this does

Improved the extract_content method to correctly process Action Text. When message model uses has_rich_text :content, message.content becomes ActionText:RichText, returning HTML tags unintentionally. Adjustments ensure only the desired content is extracted.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

  • I read the Contributing Guide
  • This aligns with RubyLLM's focus on LLM communication
  • This isn't application-specific logic that belongs in user code
  • This benefits most users, not just my specific use case

Quality check

  • I ran overcommit --install and all hooks pass
  • I tested my changes thoroughly
  • I updated documentation if needed
  • I didn't modify auto-generated files manually (models.json, aliases.json)

API changes

  • Breaking change
  • New public methods/classes
  • Changed method signatures
  • No API changes

Related issues

Improved the `extract_content` method to correctly process Action Text. When `message` model uses `has_rich_text :content`, `message.content` becomes `ActionText:RichText`, returning HTML tags unintentionally. Adjustments ensure only the desired content is extracted.
Copy link
Owner

@crmne crmne left a comment

Choose a reason for hiding this comment

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

Can you add some tests?

@chagel
Copy link
Author

chagel commented Aug 30, 2025

Can you add some tests?

@crmne Added basic tests and modified dummy app for instance double.

Copy link

codecov bot commented Sep 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.68%. Comparing base (32611af) to head (c5f8706).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #365      +/-   ##
==========================================
+ Coverage   84.65%   84.68%   +0.02%     
==========================================
  Files          35       35              
  Lines        1825     1828       +3     
  Branches      492      494       +2     
==========================================
+ Hits         1545     1548       +3     
  Misses        280      280              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants