Skip to content
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

Merged
merged 3 commits into from
May 11, 2023
Merged

Add no_pretty renderer option to chat command #9

merged 3 commits into from
May 11, 2023

Conversation

artero
Copy link
Owner

@artero artero commented May 9, 2023

Closes: #5

@artero artero requested a review from pablorc May 9, 2023 23:23
@artero artero merged commit 4672dcf into main May 11, 2023
@artero artero deleted the renderers branch May 11, 2023 19:32
Copy link
Collaborator

@pablorc pablorc left a 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

README.md Show resolved Hide resolved
module Jambots::Renderers
class CliRenderer
def render(conversation, &block)
spinner.auto_spin
Copy link
Collaborator

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

Copy link
Owner Author

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

Copy link
Collaborator

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

Copy link
Owner Author

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

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.

Implement a Minimalist Renderer for Piped Commands
2 participants