Revert "Refa: Chats /chat API to RESTFul (#13871)" (#13877)

### What problem does this PR solve?

This reverts commit 1a608ac411.

### Type of change

- [x] Other (please describe):
This commit is contained in:
Liu An
2026-04-01 11:05:29 +08:00
committed by GitHub
parent 1a608ac411
commit b1d28b5898
52 changed files with 3584 additions and 2044 deletions

View File

@@ -2,13 +2,10 @@ import api from '@/utils/api';
import { registerNextServer } from '@/utils/register-server';
const {
createChat,
listChats,
getChat,
updateChat,
patchChat,
deleteChat,
bulkDeleteChats,
getDialog,
setDialog,
// listDialog,
removeDialog,
getConversation,
getConversationSSE,
setConversation,
@@ -29,38 +26,27 @@ const {
ask,
mindmap,
getRelatedQuestions,
listNextDialog,
upload_and_parse,
fetchExternalChatInfo,
} = api;
const methods = {
createChat: {
url: createChat,
getDialog: {
url: getDialog,
method: 'get',
},
setDialog: {
url: setDialog,
method: 'post',
},
listChats: {
url: listChats,
method: 'get',
removeDialog: {
url: removeDialog,
method: 'post',
},
getChat: {
url: getChat,
method: 'get',
},
updateChat: {
url: updateChat,
method: 'put',
},
patchChat: {
url: patchChat,
method: 'patch',
},
deleteChat: {
url: deleteChat,
method: 'delete',
},
bulkDeleteChats: {
url: bulkDeleteChats,
method: 'delete',
listDialog: {
url: listNextDialog,
method: 'post',
},
listConversation: {
url: listConversation,