This commit is contained in:
Lars committed 2026-08-25 13:57:23 +02:00
1 parent a8caeb0dd4
commit fd7102e3b3
95 files changed
+16520 -193

No files matched your search

+13
View File
@@ -117,6 +117,19 @@ def update_prompt(prompt_id: str, req: PromptWrite, session: dict = Depends(requ
current = row_to_dict(conn.execute("SELECT id FROM ai_prompts WHERE id = ?", (prompt_id,)).fetchone())
if not current:
raise HTTPException(404, "Prompt nicht gefunden")
if req.prompt_type == "base" and req.template:
try:
preview_prompt(
{
"id": prompt_id,
"slug": req.slug.strip(),
"prompt_type": req.prompt_type,
"template": req.template,
},
{},
)
except EngineError as exc:
_http(exc)
conn.execute(
"""
UPDATE ai_prompts