fix(js/genkit): Explicitly allow null types in promptDir#5036
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to disable automatic prompt loading by allowing promptDir to be set to null in GenkitOptions. However, feedback indicates that the implementation of the prompt() method still defaults to the standard directory when null is provided, meaning the opt-out behavior is not yet fully functional. Furthermore, the added test case needs to be more robust to ensure it correctly verifies that file-based loading is disabled even when prompts exist in the default directory.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to disable automatic prompt loading by setting the promptDir option to null. Changes include updating type definitions in prompt.ts and genkit.ts, adjusting the logic in the Genkit class to respect the null value instead of defaulting to the ./prompts directory, and adding a unit test to verify that prompts are not loaded when promptDir is null. I have no feedback to provide.
Description here... Help the reviewer by:
./promptsloading.In
genkit.ts(972-978 line)Checklist (if applicable):