mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Fix: Fixed the issue where the error prompt box on the Agent page would be covered #3221 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
102
web/src/services/agent-service.ts
Normal file
102
web/src/services/agent-service.ts
Normal file
@ -0,0 +1,102 @@
|
||||
import api from '@/utils/api';
|
||||
import { registerNextServer } from '@/utils/register-server';
|
||||
|
||||
const {
|
||||
getCanvasSSE,
|
||||
setCanvas,
|
||||
listCanvas,
|
||||
resetCanvas,
|
||||
removeCanvas,
|
||||
runCanvas,
|
||||
listTemplates,
|
||||
testDbConnect,
|
||||
getInputElements,
|
||||
debug,
|
||||
listCanvasTeam,
|
||||
settingCanvas,
|
||||
uploadCanvasFile,
|
||||
trace,
|
||||
inputForm,
|
||||
fetchVersionList,
|
||||
fetchVersion,
|
||||
fetchCanvas,
|
||||
} = api;
|
||||
|
||||
const methods = {
|
||||
fetchCanvas: {
|
||||
url: fetchCanvas,
|
||||
method: 'get',
|
||||
},
|
||||
getCanvasSSE: {
|
||||
url: getCanvasSSE,
|
||||
method: 'get',
|
||||
},
|
||||
setCanvas: {
|
||||
url: setCanvas,
|
||||
method: 'post',
|
||||
},
|
||||
fetchVersionList: {
|
||||
url: fetchVersionList,
|
||||
method: 'get',
|
||||
},
|
||||
fetchVersion: {
|
||||
url: fetchVersion,
|
||||
method: 'get',
|
||||
},
|
||||
listCanvas: {
|
||||
url: listCanvas,
|
||||
method: 'get',
|
||||
},
|
||||
resetCanvas: {
|
||||
url: resetCanvas,
|
||||
method: 'post',
|
||||
},
|
||||
removeCanvas: {
|
||||
url: removeCanvas,
|
||||
method: 'post',
|
||||
},
|
||||
runCanvas: {
|
||||
url: runCanvas,
|
||||
method: 'post',
|
||||
},
|
||||
listTemplates: {
|
||||
url: listTemplates,
|
||||
method: 'get',
|
||||
},
|
||||
testDbConnect: {
|
||||
url: testDbConnect,
|
||||
method: 'post',
|
||||
},
|
||||
getInputElements: {
|
||||
url: getInputElements,
|
||||
method: 'get',
|
||||
},
|
||||
debugSingle: {
|
||||
url: debug,
|
||||
method: 'post',
|
||||
},
|
||||
listCanvasTeam: {
|
||||
url: listCanvasTeam,
|
||||
method: 'get',
|
||||
},
|
||||
settingCanvas: {
|
||||
url: settingCanvas,
|
||||
method: 'post',
|
||||
},
|
||||
uploadCanvasFile: {
|
||||
url: uploadCanvasFile,
|
||||
method: 'post',
|
||||
},
|
||||
trace: {
|
||||
url: trace,
|
||||
method: 'get',
|
||||
},
|
||||
inputForm: {
|
||||
url: inputForm,
|
||||
method: 'get',
|
||||
},
|
||||
} as const;
|
||||
|
||||
const agentService = registerNextServer<keyof typeof methods>(methods);
|
||||
|
||||
export default agentService;
|
||||
Reference in New Issue
Block a user