-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add no_pretty renderer option to chat command #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just throwin' ideas at your face
module Jambots::Renderers | ||
class CliRenderer | ||
def render(conversation, &block) | ||
spinner.auto_spin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the spinner should be put in the Thor file, and these renderers are like Rails views, where everything is computed and they just render the final response.
Just an idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some doubts about it. Could we have problems if we have a spinner and create a not-pretty output to send it in a pipeline like in the following example?
$ jambots chat "hello" --no-pretty > hello.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens right now when you do this? I did that in the Kevin/Bob experiment and I didn't see any spinners. I suppose they buffer play TTY does avoids weird behaviors when redirecting the output.
If this is covered it should be OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll try it
Closes: #5