adds ability to star chats

This commit is contained in:
2026-05-28 22:47:45 -07:00
parent cb8ea935fa
commit a6c2ec664b
16 changed files with 779 additions and 145 deletions

View File

@@ -68,6 +68,14 @@ export class SybilApiClient {
return data.chat;
}
async updateChatStar(chatId: string, starred: boolean) {
const data = await this.request<{ chat: ChatSummary }>(`/v1/chats/${chatId}/star`, {
method: "PATCH",
body: { starred },
});
return data.chat;
}
async suggestChatTitle(body: { chatId: string; content: string }) {
const data = await this.request<{ chat: ChatSummary }>("/v1/chats/title/suggest", {
method: "POST",
@@ -98,6 +106,14 @@ export class SybilApiClient {
return data.search;
}
async updateSearchStar(searchId: string, starred: boolean) {
const data = await this.request<{ search: SearchSummary }>(`/v1/searches/${searchId}/star`, {
method: "PATCH",
body: { starred },
});
return data.search;
}
async deleteSearch(searchId: string) {
await this.request<{ deleted: true }>(`/v1/searches/${searchId}`, { method: "DELETE" });
}