feat(inbox): 素材持久化 CRUD — 数据库表 + API + 前端接入
- 新增 materials 表(id/projectId/description/associatedDate/status/createdAt/updatedAt) - 新增 4 个后端 API 路由(list/create/get/delete)+ 13 个测试 - 新增 use-materials hooks(TanStack Query) - 收集箱页面重构为三层架构(InboxPage + MaterialSidebar + MaterialDetailPanel) - MaterialCard: Popconfirm 删除确认 + 粗粒度时间格式 - MaterialContent: 展示状态标签 + createdAt - 更新开发文档 backend.md / frontend.md
This commit is contained in:
@@ -28,6 +28,11 @@ export interface CreateConversationRequest {
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface CreateMaterialRequest {
|
||||
associatedDate: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface CreateModelRequest {
|
||||
capabilities: ModelCapability[];
|
||||
contextLength?: null | number;
|
||||
@@ -54,6 +59,29 @@ export interface CreateProviderRequest {
|
||||
// 前后端共享的类型都放在这个文件中
|
||||
// ==========================================
|
||||
|
||||
export interface Material {
|
||||
associatedDate: string;
|
||||
createdAt: string;
|
||||
description: string;
|
||||
id: string;
|
||||
projectId: string;
|
||||
status: MaterialStatus;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface MaterialListResponse {
|
||||
items: Material[];
|
||||
page: number;
|
||||
pageSize: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface MaterialResponse {
|
||||
material: Material;
|
||||
}
|
||||
|
||||
export type MaterialStatus = "approved" | "discarded" | "pending";
|
||||
|
||||
export interface Message {
|
||||
content: string;
|
||||
conversationId: string;
|
||||
|
||||
Reference in New Issue
Block a user