Add chat thread forking
TestFlight / Build and upload (push) Successful in 1m52s

This commit is contained in:
2026-08-16 17:42:39 -07:00
parent 42022bf055
commit eb2b0d3ca0
17 changed files with 1410 additions and 244 deletions
+12
View File
@@ -1,6 +1,8 @@
export type ChatSummary = {
id: string;
title: string | null;
parentChatId: string | null;
titleGenerationPending: boolean;
createdAt: string;
updatedAt: string;
starred: boolean;
@@ -58,6 +60,8 @@ export type ToolCallEvent = {
export type ChatDetail = {
id: string;
title: string | null;
parentChatId: string | null;
titleGenerationPending: boolean;
createdAt: string;
updatedAt: string;
starred: boolean;
@@ -291,6 +295,14 @@ export async function getChat(chatId: string) {
return data.chat;
}
export async function forkChat(chatId: string, messageId?: string) {
const data = await api<{ chat: ChatSummary }>(`/v1/chats/${chatId}/fork`, {
method: "POST",
body: JSON.stringify(messageId ? { messageId } : {}),
});
return data.chat;
}
export async function updateChatTitle(chatId: string, title: string) {
const data = await api<{ chat: ChatSummary }>(`/v1/chats/${chatId}`, {
method: "PATCH",