删除一些未使用的函数
This commit is contained in:
parent
e35c0b6782
commit
1dffd4194a
@ -1,10 +1,10 @@
|
||||
import axios from 'axios'
|
||||
|
||||
import type { AIAgent, AgentExecutionResult } from '../types'
|
||||
import { deleteRecords, createRecord, updateRecord, getFieldSelectOptions, getRecord } from './common'
|
||||
import type { AIAgent } from '../types'
|
||||
import { getRecord } from './common'
|
||||
|
||||
// 重新导出类型,供其他模块使用
|
||||
export type { AIAgent, AgentExecutionResult }
|
||||
export type { AIAgent }
|
||||
|
||||
// 统一使用相对路径,通过 Vite 代理转发到后端
|
||||
|
||||
@ -74,22 +74,3 @@ export const updateAgentApi = async (name: string, data: Partial<AIAgent>): Prom
|
||||
throw new Error(error.response?.data?.message || error.message || '更新AI Agent失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 创建智能体(使用通用函数)
|
||||
export const createAgent = async (data: Record<string, any>): Promise<{ success: boolean; data?: any; message?: string }> => {
|
||||
return createRecord('Local Ai Agent', data)
|
||||
}
|
||||
|
||||
// 更新智能体(使用通用函数)
|
||||
export const updateAgent = async (name: string, data: Record<string, any>): Promise<{ success: boolean; data?: any; message?: string }> => {
|
||||
return updateRecord('Local Ai Agent', name, data)
|
||||
}
|
||||
|
||||
// 删除智能体(支持批量删除)
|
||||
export const deleteAgents = async (names: string[]): Promise<{ success: boolean; message?: string }> => {
|
||||
return deleteRecords('Local Ai Agent', names)
|
||||
}
|
||||
|
||||
// 获取智能体选项(参考节点实现)
|
||||
export const getAgentStatusOptions = () => getFieldSelectOptions('Local Ai Agent', 'status')
|
||||
export const getAgentTriggerModeOptions = () => getFieldSelectOptions('Local Ai Agent', 'trigger_mode')
|
||||
Loading…
x
Reference in New Issue
Block a user