diff --git a/src/api/chat.ts b/src/api/chat.ts index c3f5686..66eb5dc 100644 --- a/src/api/chat.ts +++ b/src/api/chat.ts @@ -58,6 +58,8 @@ export const ChatAPI = { imageUrls }) .then((r) => r.data), + switchBranch: (agentId: string, userMsgId: string, branchId: string) => + api.post(`/agents/${agentId}/messages/${userMsgId}/branches/${branchId}/switch`).then((r) => r.data), clear: (roomId: string) => api.delete(`/rooms/${roomId}/messages`).then((r) => r.data) }; diff --git a/src/pages/chat/components/ChatInput.tsx b/src/pages/chat/components/ChatInput.tsx index 0c15144..f90bd26 100644 --- a/src/pages/chat/components/ChatInput.tsx +++ b/src/pages/chat/components/ChatInput.tsx @@ -11,7 +11,7 @@ export default function ChatInput(props: { setInput: (v: string) => void; sending: boolean; attachments: ChatAttachment[]; - setAttachments: (updater: (prev: ChatAttachment[]) => ChatAttachment[]) => ChatAttachment[]; + setAttachments: (updater: (prev: ChatAttachment[]) => ChatAttachment[]) => void; imageUrls: string[]; setImageUrls: (updater: (prev: string[]) => string[]) => void; onSend: () => void;