Automattic / studio

Studio by WordPress.com, a free desktop app that helps developers streamline their local WordPress development workflow.
https://developer.wordpress.com/studio/
GNU General Public License v2.0
172 stars 17 forks source link

Studio: Add rotation to welcome messages #520

Closed katinthehatsite closed 2 weeks ago

katinthehatsite commented 2 weeks ago

Closes: https://github.com/Automattic/dotcom-forge/issues/8981

Proposed Changes

This PR adds a rotation for example prompts so that every time you access the Assistant tab, you will get a new selection of prompts that come from the backend.

Testing Instructions

Pre-merge Checklist

katinthehatsite commented 2 weeks ago

I am expecting that the rotation mechanism might become more complex in the future so I added it to a separate hook

matt-west commented 2 weeks ago

Should we keep them static once they've loaded and change them only when the user rests the conversation?

I think that's sensible. It definitely feels weird to me for the prompts to change when the window is re-focussed.

katinthehatsite commented 2 weeks ago

@sejas we can cache the rotation once the user opens them for the first time on a specific site. I would like to merged this first if possible so that I can also work on https://github.com/Automattic/dotcom-forge/issues/8982 as some of the code is going to overlap. Can we handle this in a separate PR?