bra1nDump / show-me-chatgpt-plugin

Create and edit diagrams in ChatGPT
https://showme.redstarplugin.com
674 stars 71 forks source link

Feature Request: User Preference for Mermaid Diagram Theme #48

Closed shmeezshmeez closed 1 year ago

shmeezshmeez commented 1 year ago

I've been using the show-me-chatgpt-plugin and found it really useful for creating and visualizing diagrams directly in the chat. However, I noticed that the plugin defaults to the "default" Mermaid theme and there's no built-in mechanism for users to specify their preferences, like the theme of the diagram.

I believe it would be beneficial to allow users to choose their preferred Mermaid theme. For example, a user might want to use the "dark" or "neutral" theme based on their personal preference or the context of where the diagram will be used.

Here's a high-level approach for this feature:

Update the API to accept a new parameter from the request URL for the theme. Pass the user's preferred theme to the Mermaid configuration when creating the diagram. Add error handling and validation to ensure that the provided theme is a valid Mermaid theme. I'm currently learning how to work with TypeScript and would be interested in trying to implement this feature myself with some guidance. Could you please let me know if this sounds like a worthwhile addition to the project, and if you have any advice or considerations I should keep in mind while working on this feature?

Thank you for your time and for creating this useful plugin!