MCPcopy
hub / github.com/AstrBotDevs/AstrBot / dashboard_regenerate_message

Function dashboard_regenerate_message

astrbot/dashboard/api/chat.py:398–417  ·  view source on GitHub ↗
(
    request: Request,
    username: str = Depends(require_dashboard_user),
    service: ChatService = Depends(get_service),
)

Source from the content-addressed store, hash-verified

396
397@legacy_router.post("/message/regenerate")
398async def dashboard_regenerate_message(
399 request: Request,
400 username: str = Depends(require_dashboard_user),
401 service: ChatService = Depends(get_service),
402):
403 try:
404 payload = (
405 await service.prepare_regenerate_message_payload_from_dashboard_payload(
406 username,
407 await _json_or_empty(request),
408 )
409 )
410 except ChatServiceError as exc:
411 return JSONResponse(error(str(exc)))
412 return await _send_chat(
413 request=request,
414 username=username,
415 service=service,
416 payload=payload,
417 )
418
419
420@legacy_router.post("/thread/create")

Callers

nothing calls this directly

Calls 4

errorFunction · 0.90
_send_chatFunction · 0.85
_json_or_emptyFunction · 0.70

Tested by

no test coverage detected