mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-18 10:07:02 +00:00
08c050ce21
Custom prompts saved via the Settings -> Prompts UI are persisted to the database, but every assistant and flow session creation path was using templates.NewDefaultPrompter() with a leftover TODO, so user overrides never reached the agents and Langfuse traces always showed the defaults. Add a controller-side helper that loads the user's saved prompts and overlays them on the compiled defaults. Prompt types the user has not customized continue to use the defaults; an empty body row is treated as no override (the UI uses delete to reset). A database error fails session creation explicitly instead of silently falling back. Wire the helper into the four affected call sites in NewAssistantWorker, LoadAssistantWorker, NewFlowWorker, and LoadFlowWorker. Closes #300 Signed-off-by: mason5052 <ehehwnwjs5052@gmail.com>