将计划清单、运行中插话和个人记忆接入云端 Agent;全站模型选择器统一为左右二级菜单。画布摘要按预算截断不再整轮拒绝,首页视频未知宽高可入库。README 补充贡献者 morrow。 Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
1020 B
TypeScript
26 lines
1020 B
TypeScript
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;
|