fix(eight_ball): improve response formatting#879
Merged
HikariNee merged 4 commits intoallthingslinux:mainfrom Jun 2, 2025
jakobdylanc:main
Merged
fix(eight_ball): improve response formatting#879HikariNee merged 4 commits intoallthingslinux:mainfrom jakobdylanc:main
HikariNee merged 4 commits intoallthingslinux:mainfrom
jakobdylanc:main
Conversation
Contributor
Reviewer's GuideRefactors the File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @jakobdylanc - I've reviewed your changes - here's some feedback:
- Extract the message‐box formatting (wrapping, borders, etc.) into a helper function to reduce inline complexity and duplication.
- Replace the hardcoded
width = 30with a named constant or parameter so it’s easier to adjust in the future. - Dedent or use raw multiline strings for the ASCII art to avoid accidental indentation that could misalign the art.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
shortens question if >120 instead of not responding, and wraps response with a width of 30
Collaborator
|
Please move all constants (like the width value) into our constants file |
Contributor
Author
Done. |
HikariNee
approved these changes
Jun 2, 2025
Contributor
HikariNee
left a comment
There was a problem hiding this comment.
Tested on my local machine, works well.
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.
before:

after:
shortened question example:
(input:
All Things Linux is a 501(c)(3) non-profit organization with a mission to empower the Linux ecosystem through education, collaboration, and support.)Summary by Sourcery
Improve eight_ball command’s message styling by wrapping responses to a fixed width, shortening overly long questions instead of rejecting them, and unifying ASCII framing for both cow and default modes.
Enhancements: