List all chats.
Create a new chat.
Delete a chat.
Get a chat by id.
Rename chat title.
Update a chat's folder.
List all folders.
Create a new folder.
Delete a folder.
Rename a folder.
Store global app state. For example:
- Sidebar selected folder id
Store chat state. For example:
- Chat id
- Chat messages
- Chat input
- Chat is loading
- Other chat props
For persistent state, use cookies instead of local storage to avoid glitch and layout-shift.