MichielvanBeers / Flow.Launcher.Plugin.ChatGPT

MIT License
37 stars 5 forks source link

[FEATURE REQUEST] Show the whole response on right side of Flow launcher #44

Closed mlazzarotto closed 10 months ago

mlazzarotto commented 10 months ago

I find that most of the time ChatGPT response is longer that the space available on Flow launcher, despite setting 'short' in the settings, and I find myself to open the text file to see the whole response: image Would be possible to show the full answer on the right side (where it says: "Copy to clipboard")?

MichielvanBeers commented 10 months ago

Hi @mlazzarotto, that is a great idea indeed! I've looked through the Flow Launcher documentation, but I didn't find a way to increase the height of the preview in the bottom right corner. Might be a good idea to do a feature request with Flow Launcher itself, to support this:

mlazzarotto commented 10 months ago

Hi @MichielvanBeers, by swapping title and subtitle (lines 74 and 81), I was able to get the answer on the preview pane. before

self.add_item(
                    title="Copy to clipboard",
                    subtitle=f"Answer: {short_answer}",
                    method=self.copy_answer,
                    parameters=[answer],
                )

after

self.add_item(
                    title=f"Answer: {short_answer}",
                    subtitle="Copy to clipboard",
                    method=self.copy_answer,
                    parameters=[answer],
                )

And by using an insanely high number in short_answer = self.ellipsis(answer, 30) at line 71, I was able to get the full text string like in the picture. image That's good enough for me, lol. I hope I gave you a good suggestion, then it's up to you if you want to implement it in the plugin.

MichielvanBeers commented 10 months ago

Hi @mlazzarotto, that is great, happy you found a way! I'll put it on the list for the update that I will be doing to make this configurable