add message history
Some checks failed
Deploy / deploy (build, debian, 22) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822) (push) Has been cancelled

This commit is contained in:
2026-05-06 07:12:52 -06:00
parent 77aca640ac
commit 2b216878ca
5 changed files with 247 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ import type {
FlagType,
SubmissionOut,
PromptMessage,
PromptHistoryItem,
TaskStatsOut,
TaskAsset,
AwardSection,
@@ -306,6 +307,11 @@ export const Prompt = {
return (await http.get("/prompt/conversations/", { params })).data
},
async listHistory(taskId: number): Promise<PromptHistoryItem[]> {
const res = await http.get(`/prompt/history/${taskId}`)
return res.data
},
async getMessages(conversationId: string): Promise<PromptMessage[]> {
return (
await http.get<PromptMessage[]>(