Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(prompts): add folder path when creating prompt from folder (#12043)

Nimar0263ed876e1e
diff --git a/web/src/features/prompts/components/NewPromptForm/index.tsx b/web/src/features/prompts/components/NewPromptForm/index.tsx
index c93f765f8d..7d9eec8afc 100644
--- a/web/src/features/prompts/components/NewPromptForm/index.tsx
+++ b/web/src/features/prompts/components/NewPromptForm/index.tsx
@@ -217,6 +217,9 @@ export const NewPromptForm: React.FC<NewPromptFormProps> = (props) => {
) {
setInitialMessages(draft.chatPrompt);
}
+ if (folderPath && !initialPrompt) {
+ form.setValue("name", `${folderPath}/`);
+ }
},
});