feat: add manual "转人工" (request human) action for conversations

- Backend: RequestHuman service method changes status from AI_SERVING to PENDING
- Backend: POST /api/dashboard/conversation/request-human endpoint
- Frontend: requestHumanConversation API client
- Frontend: "转人工" button in conversation list dropdown and detail dialog
This commit is contained in:
Aibo117
2026-05-26 15:46:09 +08:00
parent c5d0317bb6
commit 63dec1d8f1
6 changed files with 99 additions and 1 deletions
@@ -185,6 +185,22 @@ func (c *ConversationController) PostTransfer() *web.JsonResult {
return web.JsonSuccess()
}
func (c *ConversationController) PostRequest_human() *web.JsonResult {
operator, err := services.AuthService.RequirePermission(c.Ctx, constants.PermissionConversationAssign)
if err != nil {
return web.JsonError(err)
}
req := request.RequestHumanConversationRequest{}
if err := params.ReadJSON(c.Ctx, &req); err != nil {
return web.JsonError(err)
}
if err := services.ConversationService.RequestHuman(req.ConversationID, operator); err != nil {
return web.JsonError(err)
}
return web.JsonSuccess()
}
func (c *ConversationController) PostClose() *web.JsonResult {
operator, err := services.AuthService.RequirePermission(c.Ctx, constants.PermissionConversationClose)
if err != nil {