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 option to turn off markdown formater #438

Closed
edshamis opened this issue Jan 12, 2024 · 5 comments · Fixed by #481
Closed

Add option to turn off markdown formater #438

edshamis opened this issue Jan 12, 2024 · 5 comments · Fixed by #481
Assignees
Labels
enhancement New feature or request

Comments

@edshamis
Copy link

I need to pipe sgpt output, now the md formatter removes md symbols which I want to be preserved in the pipe

@jeanlucthumm
Copy link
Contributor

#423 (comment)

@TheR1D TheR1D added the enhancement New feature or request label Jan 31, 2024
@TheR1D TheR1D self-assigned this Feb 11, 2024
@TheR1D
Copy link
Owner

TheR1D commented Feb 11, 2024

This feature was added in 1.3.0.

Markdown formatting now depends on the role description. For instance, if the role includes "APPLY MARKDOWN" in its description, the output for this role will be Markdown-formatted. This applies to both default and custom roles. If you would like to disable Markdown formatting, edit the default role description in ~/.config/shell_gpt/roles.

But it is probably a good idea to disable it based on sys.stdout.isatty() as @jeanlucthumm mentioned. But I'm not sure how exactly we should implement it, since we specifcally requiring Markdown in the role description.

@edshamis
Copy link
Author

edshamis commented Feb 12, 2024

It's about disabling the formatter, not about the md format. It would be lovely to have an option to print the response as is it to stdout without using md formatter. I wonder if I'm clear?))

@ryanfreckleton
Copy link

I was about to request this. Yes, the issue isn't markdown output, but the formatter, Rich, I think?

Outputting Markdown format without going through Rich would enable me to use it a lot more easily as part of my flow.

@TheR1D TheR1D linked a pull request Feb 17, 2024 that will close this issue
3 tasks
@TheR1D
Copy link
Owner

TheR1D commented Feb 22, 2024

Released in 1.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants