修改了历史会话显示的问题和默认查看历史记录信息

This commit is contained in:
allen2fuc
2026-04-29 15:27:45 +08:00
parent 7936fea313
commit c7b340087a
5 changed files with 106 additions and 14 deletions
+5 -3
View File
@@ -131,9 +131,11 @@ export async function listMessages(chatId: string): Promise<MessageRead[]> {
}
export async function clearChat(chatId: string): Promise<void> {
await fetch(`${getAIBaseUrl()}/sse/clear?chat_id=${encodeURIComponent(chatId)}`, {
method: "POST",
});
const res = await fetch(
`${getAIBaseUrl()}/sse/clear?chat_id=${encodeURIComponent(chatId)}`,
{ method: "POST" },
);
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
}
export async function updateMessageApplied(messageId: string, applied: boolean): Promise<void> {