Display content raw in message template#574
Open
nerlichman wants to merge 1 commit intocrmne:mainfrom
Open
Conversation
Author
There was a problem hiding this comment.
Pull request overview
This PR adds support for displaying raw message content in the chat UI when structured content is present but no plain text content exists. The feature displays Hash-based raw content in a collapsible details element with a preview of keys and values.
Changes:
- Added new
_content_raw.html.erbpartial template for rendering Hash-based raw content with collapsible preview - Modified
_message.html.erbtemplate to conditionally render raw content when no plain text content exists - Updated chat UI generator to create the new content_raw partial file
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| spec/ruby_llm/generators/chat_ui_generator_spec.rb | Added test expectations to verify _content_raw.html.erb file is generated |
| lib/generators/ruby_llm/chat_ui/templates/views/messages/_message.html.erb.tt | Added conditional logic to render content_raw when content is absent |
| lib/generators/ruby_llm/chat_ui/templates/views/messages/_content_raw.html.erb.tt | New template for displaying raw content as collapsible JSON with preview |
| lib/generators/ruby_llm/chat_ui/chat_ui_generator.rb | Added generator command to create _content_raw.html.erb template |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lib/generators/ruby_llm/chat_ui/templates/views/messages/_content_raw.html.erb.tt
Outdated
Show resolved
Hide resolved
lib/generators/ruby_llm/chat_ui/templates/views/messages/_content_raw.html.erb.tt
Outdated
Show resolved
Hide resolved
lib/generators/ruby_llm/chat_ui/templates/views/messages/_message.html.erb.tt
Show resolved
Hide resolved
fa90b1d to
5736a1f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What this does
Type of change
Scope check
Quality check
overcommit --installand all hooks passbundle exec rake vcr:record[provider_name]bundle exec rspecmodels.json,aliases.json)API changes
Related issues