feat(frontend): two-phase cloning with loading state

This commit is contained in:
CREDO23 2026-01-28 00:17:44 +02:00
parent 0c8d1f3fef
commit 9a4da10b12
5 changed files with 85 additions and 13 deletions

View file

@ -39,16 +39,28 @@ export const getPublicChatResponse = z.object({
});
/**
* Clone public chat
* Clone public chat (init)
*/
export const clonePublicChatRequest = z.object({
share_token: z.string(),
});
export const clonePublicChatResponse = z.object({
thread_id: z.number(),
search_space_id: z.number(),
share_token: z.string(),
});
/**
* Complete clone
*/
export const completeCloneRequest = z.object({
thread_id: z.number(),
});
export const completeCloneResponse = z.object({
status: z.string(),
task_id: z.string(),
message: z.string(),
message_count: z.number(),
});
// Type exports
@ -59,3 +71,5 @@ export type GetPublicChatRequest = z.infer<typeof getPublicChatRequest>;
export type GetPublicChatResponse = z.infer<typeof getPublicChatResponse>;
export type ClonePublicChatRequest = z.infer<typeof clonePublicChatRequest>;
export type ClonePublicChatResponse = z.infer<typeof clonePublicChatResponse>;
export type CompleteCloneRequest = z.infer<typeof completeCloneRequest>;
export type CompleteCloneResponse = z.infer<typeof completeCloneResponse>;