genkit icon indicating copy to clipboard operation
genkit copied to clipboard

[dotprompt] Always reload .prompt files in dev mode

Open mbleigh opened this issue 1 year ago • 2 comments

I suggest that when NODE_ENV=development (or GENKIT_ENV=dev) .prompt files should be automatically reloaded from disk before each invocation. This would be beneficial for a few reasons:

  1. We could stop rebooting the entire server when a .prompt file changes, speeding up iteration
  2. There would be less chance of "stale prompts" which seems to happen to me relatively frequently though I'm not sure why

To accomplish this I think we need the proxy ref construct proposed in #513, but once we had that it would be pretty trivial.

mbleigh avatar Jul 09 '24 17:07 mbleigh

Update on this: see #744 which is honestly even more annoying than stale prompts because it actually breaks the flow of the server. Let's solve both of these problems.

mbleigh avatar Aug 04 '24 19:08 mbleigh

linking https://github.com/firebase/genkit/pull/842

cabljac avatar Aug 30 '24 11:08 cabljac

https://github.com/firebase/genkit/pull/1380

cabljac avatar Nov 25 '24 18:11 cabljac