xenodium / chatgpt-shell

A multi-llm Emacs shell (ChatGPT, Claude, Gemini, Ollama, Perplexity) + editing integrations
https://lmno.lol/alvaro
GNU General Public License v3.0
867 stars 77 forks source link

[Feature request] Extend markdown rendering #85

Closed guibor closed 1 year ago

guibor commented 1 year ago

ChatGPT uses markdown for regular responses (e.g bold and more). The suggestion is to add to the prompt default to add a markdown tag when the response is in markdown, so that it's nicely rendered in the ChatGPT shell window.

xenodium commented 1 year ago

add a markdown tag when the response is in markdown

Could you share more details? Maybe an example of the default prompt and what effect it should have on the output? At present blocks and inline code are handled as markdown.

guibor commented 1 year ago

See example below.

I actually think that changing the prompt is probably not the best solution and it may be better to have a setting to display markdown markers elegantly (since ChatGPT uses them).

Screenshot 2023-05-07 at 8 27 07

xenodium commented 1 year ago

Got it. Renamed feature request title. This could maybe be done by extending the overlay handling (add more regular expressions), but needs experimenting a little. Not sure when I'll get to it. Are you keen to contribute?

xenodium commented 1 year ago

Extended basic markdown support. May have some bugs, please file if you find some.

Screenshot 2023-05-14 at 01 03 42
guibor commented 1 year ago

This is awesome! I noticed it's a bit inconsistent though, for example the markdown display tends to disappear from previous answers and I didn't get the same formatting for the palette question.

image

But this is really great!

xenodium commented 1 year ago

This is awesome! I noticed it's a bit inconsistent though, for example the markdown display tends to disappear from previous answers and I didn't get the same formatting for the palette question.

First iteration and all ;) As I mentioned, prolly has some bugs.

Can you try reproducing and sharing the transcript of failed renderings? This would help me reproduce the same rendering issue. Save the transcript with shell-maker-save-session-transcript

xenodium commented 1 year ago

ps. thanks for the support @guibor!

xenodium commented 1 year ago

Somewhat related, added chatgpt-shell-refresh-rendering interactive command.