feat: 完成意心ai agent

This commit is contained in:
ccnetcore
2026-01-07 22:25:54 +08:00
parent 00a9bd00e5
commit 40234343ff
19 changed files with 1469 additions and 33 deletions

View File

@@ -0,0 +1,25 @@
import type { AgentSendInput, AgentToolOutput } from './types';
import { get, post } from '@/utils/request';
/**
* Agent 发送消息
*/
export function agentSend(data: AgentSendInput) {
return post('/ai-chat/agent/send', data);
}
/**
* 获取 Agent 工具列表
*/
export function getAgentTools() {
return post<AgentToolOutput[]>('/ai-chat/agent/tool').json();
}
/**
* 获取 Agent 上下文
*/
export function getAgentContext(sessionId: string) {
return post<string>(`/ai-chat/agent/context/${sessionId}`).json();
}
export * from './types';