MichielvanBeers / Flow.Launcher.Plugin.ChatGPT

MIT License
45 stars 7 forks source link

[FEATURE REQUEST]: Render Markdown in Flow Launcher #58

Closed manihamidi closed 1 month ago

manihamidi commented 3 months ago

I'm wondering if there are alternatives to "Copy to clipboard" and "open .txt" file for viewing the response?

Ideally the response would just show up within Flow Launcher itself but in the meantime is it possible to open the file in a markdown rendering app instead of default txt app?

Thanks! Mani

MichielvanBeers commented 2 months ago

Hi @manihamidi,

Apologies for the late response and thank you for your suggestion! I have been thinking about this and definitely see the added value, but I'm currently stuck on how to implement this. The output can definitely be written to a Markdown file, but not every Windows machine has a Markdown renderer.

You could do a simple try out by changing line 226 in main.py (link) on your own device from temp_file = "temp_text.txt" to temp_file = "temp_text.md". That should save the output to Markdown file instead of txt.

Let me know what you think!

mlazzarotto commented 1 month ago

I did some research on FlowLauncher documentation but I couldn't find any reference to text formatting, letting alone Markdown formatting.
I believe that this feature request should be opened on FlowLauncher repo first, so that it can then be used by the plugin developers.
And yes, I tried to rename temp_text.txt to temp_text.md (and reloaded FlowLauncher) but that didn't make any difference.

manihamidi commented 1 month ago

Thanks for your reply.

changing line 226 in main.py (link) on your own device from temp_file = "temp_text.txt" to temp_file = "temp_text.md".

Yes this has actually been my interim solution so far.

this feature request should be opened on FlowLauncher repo first, so that it can then be used by the plugin developers.

Makes sense. I'll make one there.