fix: 隔离图片创作商品会话
This commit is contained in:
@@ -723,8 +723,11 @@ export const api = {
|
||||
return request<{ conversation_id: string; batch_id?: string; tasks: { id: string; status: string }[] }>("/api/ai/generate-image/", { method: "POST", body: JSON.stringify(payload) });
|
||||
},
|
||||
// 图片创作对话 CRUD —— 左栏会话列表 / 新对话 / 切换 / 重命名 / 删除
|
||||
listConversations(mode: "image" | "model" | "cover" = "image") {
|
||||
return request<Paginated<ImageConversation>>(`/api/ai/image-conversations/?mode=${mode}&page_size=100`);
|
||||
listConversations(mode: "image" | "model" | "cover" = "image", productId?: string) {
|
||||
const params = new URLSearchParams({ mode, page_size: "100" });
|
||||
if (productId) params.set("product_id", productId);
|
||||
else params.set("scope", "unbound");
|
||||
return request<Paginated<ImageConversation>>(`/api/ai/image-conversations/?${params.toString()}`);
|
||||
},
|
||||
conversationsTrash(mode: "image" | "model" | "cover" = "image") {
|
||||
return request<Paginated<ImageConversation>>(`/api/ai/image-conversations/trash/?mode=${mode}&page_size=100`);
|
||||
|
||||
Reference in New Issue
Block a user