An open API service indexing awesome lists of open source software.

https://github.com/draganaleksic99/ai-toggle-mode

Demo of Vercel AI SDK to control UI via side effects. Set light/dark/system mode by typing the mode you want, e.g. `dark mode`, in the chat. Type `clear` to delete messages from the chat.
https://github.com/draganaleksic99/ai-toggle-mode

generative-ai nextjs shadcn-ui tailwindcss typescript vercel-ai-sdk

Last synced: 4 months ago
JSON representation

Demo of Vercel AI SDK to control UI via side effects. Set light/dark/system mode by typing the mode you want, e.g. `dark mode`, in the chat. Type `clear` to delete messages from the chat.

Awesome Lists containing this project

README

          

# ai-toggle-mode

Demo of [Vercel AI SDK](https://sdk.vercel.ai/docs/introduction) to control UI via side effects. Set light/dark/system mode by typing the mode you want, e.g. `dark mode`, in the chat. Type `clear` to delete messages from the chat.


https://github.com/user-attachments/assets/1be1a7ce-9def-4971-83bf-b25b82e9d4bc
> Prompting an llm to set dark or light theme and clear messages

## Quickstart

### 1. Clone this repository

Run the following command to clone the repo:

```
https://github.com/DraganAleksic99/ai-toggle-mode.git
```

### 2. Install dependencies

```
cd ai-toggle-mode
npm i
```

### 3. Fill out secrets

```
cp .env.local.example .env.local
```

### 4. Run app locally

```
npm run dev
```

### Open in your browser

You can now visit http://localhost:3000.