Skip to content

Cache whether the system prompt icon should be there for paid users #143

Description

@AnthonyRonning

Right now the bot icon that allows me to press it to customize the system prompt on new chats looks like this:

Image

We only allow this for starter/pro/team users (not free users) but we check to see if they're paid which requires loading it. This shifts the chatbox down once it loads after .5-1s

I can think of two approaches. Cache this for paid users:

cache

Can we not just cache this somehow? At least in session storage? Or something reasonable?

This particular feature doesn't have to have the perfect gating in the world (like if the user happened to go from a paid plan to a free plan that day). Maybe 24 hour storage is fine?

invisible icon placeholder

Alternatively, we can just make sure that the chatbox is stationary no matter if the bot icon is above it or not. Maybe we always have some hidden/invisble placeholder there and once the paid check loads successfully, the chatbox wouldn't have to be shifted down.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions