Try draft prompts on own charts before saving
CI / test (push) Successful in 46s
CI / build (push) Successful in 4m16s
CI / deploy (push) Skipped

Under each prompt on /admin/promptok, "Kipróbálás" writes the summary or
detailed analysis with the text in the editor (saved or not) on one of the
admin's own charts. Test runs live in prompt_previews: never shown with the
chart, not cached, no credits, one attempt, at most three open per admin,
removed after 30 days. The worker writes them when no analysis is due. The
result shows the model, tokens, cost and time, and the draft can be loaded back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-17 14:41:12 +00:00
co-authored by Claude Opus 5.5
parent 86d5dc5503
commit b77dafdb26
13 changed files with 697 additions and 24 deletions
+2
View File
@@ -92,6 +92,8 @@ pub fn router(state: Arc<AppState>) -> Router {
.route("/v1/admin/users/{id}/credits", post(admin::adjust_credits))
.route("/v1/admin/prompts", get(prompts::list))
.route("/v1/admin/prompts/{kind}/{language}", axum::routing::put(prompts::save))
.route("/v1/admin/prompts/{kind}/{language}/preview", post(prompts::start_preview))
.route("/v1/admin/previews/{id}", get(prompts::get_preview))
.layer(cors(&state.config.cors_allowed_origins))
.layer(
TraceLayer::new_for_http()