feat(agent): Agent 工作台 - 计划插话记忆、统一模型选择器并修复摘要与视频入库
将计划清单、运行中插话和个人记忆接入云端 Agent;全站模型选择器统一为左右二级菜单。画布摘要按预算截断不再整轮拒绝,首页视频未知宽高可入库。README 补充贡献者 morrow。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
25
web/src/services/api/admin-agent-lessons.ts
Normal file
25
web/src/services/api/admin-agent-lessons.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { compactApiParams, http } from "./request";
|
||||
import { agentMemoryCategoryLabel, AGENT_MEMORY_CATEGORIES, type AgentMemory, type AgentMemoryStep } from "./agent-memories";
|
||||
|
||||
export type AdminAgentLesson = AgentMemory & {
|
||||
authorUserId?: string;
|
||||
authorUsername?: string;
|
||||
authorDisplayName?: string;
|
||||
};
|
||||
|
||||
export type { AgentMemoryStep };
|
||||
|
||||
export function listAdminAgentLessons(params: { status?: string; userId?: string; keyword?: string; limit?: number } = {}) {
|
||||
const { status, userId, keyword, limit = 100 } = params;
|
||||
return http.get<{ lessons: AdminAgentLesson[] }>("/admin/agent-lessons", {
|
||||
params: compactApiParams({ status, userId, keyword, limit }),
|
||||
timeout: 15_000,
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteAdminAgentLesson(id: string) {
|
||||
return http.delete<{ id: string }>(`/admin/agent-lessons/${encodeURIComponent(id)}`, { timeout: 15_000 });
|
||||
}
|
||||
|
||||
export const AGENT_LESSON_CATEGORIES = AGENT_MEMORY_CATEGORIES;
|
||||
export const agentLessonCategoryLabel = agentMemoryCategoryLabel;
|
||||
Reference in New Issue
Block a user