Reactive Prompts
I've created a small library called reactive-prompt
that lets you easily manage prompts in a reactive way, similar to how you'd build a web app with React. It uses Preact's Signals to track changes to inputs and automatically re-runs prompts when those inputs update. This allows for efficient chaining of prompts, where the output of one becomes the input of another, and only necessary prompts are re-evaluated. The library currently uses Chrome's experimental prompt API but could be adapted for other providers like OpenAI or Gemini. It makes complex prompt flows much more manageable.