chatcraft.org icon indicating copy to clipboard operation
chatcraft.org copied to clipboard

Starred System Prompt UX

Open kosty opened this issue 1 year ago • 3 comments

Context At the moment System Prompt editing uses custom UI. Star and drop-down menu both require some trial-n-error to figure out what is the relationship between those. It feels strange when drop down selection is made while editing, as all the text in text area disappears and is replaced with something from the drop-down. It would be great to come up with something commonly known/accepted. Search-and-Select might be just what we are looking for, if we adopt it well.

Proposal Let's have a text input field that looks pretty much like a search bar. Once text is typed into that bar a fuzzy search takes place filtering out all the stored prompts, and sorting them out by frequency of use. If size of an input text crosses some threshold X (say 42 chars for a round number 😄), we forego the drop-down/selection altogether and turn input field into text area. No search happens past that threshold. In order to save real estate in drop-down, one can show only first line, named title for convenience. Once specific title is selected it's text is placed into search input bar with "x" to the right. If input bar was expanded to Textarea, store whatever content user provided as both message and a "starred" entry capturing first line as title, current Date, and number of usages equal to 1

References https://ant.design/~demos/select-demo-search-sort https://ant.design/~demos/select-demo-select-users

kosty avatar Nov 15 '23 17:11 kosty