feat(threads): add basic message thread API and web thread panel
All checks were successful
CI / test (push) Successful in 21s

This commit is contained in:
2026-03-08 13:37:53 +03:00
parent cf1a77ae76
commit c6e8b779b0
7 changed files with 145 additions and 1 deletions

View File

@@ -76,6 +76,13 @@ export async function searchMessages(query: string, chatId?: number): Promise<Me
return data;
}
export async function getMessageThread(messageId: number, limit = 100): Promise<Message[]> {
const { data } = await http.get<Message[]>(`/messages/${messageId}/thread`, {
params: { limit }
});
return data;
}
export async function sendMessage(chatId: number, text: string, type: MessageType = "text"): Promise<Message> {
const { data } = await http.post<Message>("/messages", { chat_id: chatId, text, type });
return data;