feat: add base url utility and update api endpoints

This commit is contained in:
2025-11-11 11:27:56 +08:00
parent 21d46e7440
commit a606b5766a
12 changed files with 44 additions and 15 deletions

View File

@@ -47,9 +47,9 @@ export const useAgentList = (initialParams?: IAgentPaginationParams) => {
const envMode = import.meta.env.MODE;
let response: any = null;
// if (envMode === 'flask') {
response = await agentService.teamlistCanvas(params);
// response = await agentService.teamlistCanvas(params);
// } else {
// response = await agentService.listCanvas(params);
response = await agentService.listCanvas(params);
// }
const res = response.data || {};
logger.info('useAgentList fetchAgentList', res);

View File

@@ -351,7 +351,7 @@ export function PipelineSelectorItem() {
try {
const envMode = import.meta.env.MODE;
// const service = envMode === 'flask' ? agentService.teamlistCanvas : agentService.listCanvas;
const service = agentService.teamlistCanvas;
const service = agentService.listCanvas;
const res = await service({ canvas_category: AgentCategory.DataflowCanvas, page_size: 100 });
const data = res?.data?.data || {};
const list = data.canvas || [];