mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-04 09:17:48 +08:00
### What problem does this PR solve? Add history version save - Allows users to view and download agent files by version revision history  _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe): --------- Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
79 lines
1.3 KiB
TypeScript
79 lines
1.3 KiB
TypeScript
import api from '@/utils/api';
|
|
import registerServer from '@/utils/register-server';
|
|
import request from '@/utils/request';
|
|
|
|
const {
|
|
getCanvas,
|
|
getCanvasSSE,
|
|
setCanvas,
|
|
getListVersion,
|
|
getVersion,
|
|
listCanvas,
|
|
resetCanvas,
|
|
removeCanvas,
|
|
runCanvas,
|
|
listTemplates,
|
|
testDbConnect,
|
|
getInputElements,
|
|
debug,
|
|
} = api;
|
|
|
|
const methods = {
|
|
getCanvas: {
|
|
url: getCanvas,
|
|
method: 'get',
|
|
},
|
|
getCanvasSSE: {
|
|
url: getCanvasSSE,
|
|
method: 'get',
|
|
},
|
|
setCanvas: {
|
|
url: setCanvas,
|
|
method: 'post',
|
|
},
|
|
getListVersion: {
|
|
url: getListVersion,
|
|
method: 'get',
|
|
},
|
|
getVersion: {
|
|
url: getVersion,
|
|
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',
|
|
},
|
|
} as const;
|
|
|
|
const flowService = registerServer<keyof typeof methods>(methods, request);
|
|
|
|
export default flowService;
|