Add teacher microphone and per-question model selection

This commit is contained in:
鲨鱼辣椒 committed 2026-09-29 19:43:45 +08:00
1 parent cd1ba41e21
commit 78cfde6734
20 files changed
+517 -37

No files matched your search

+2
View File
@@ -1,5 +1,6 @@
import { hostApiFetch, createHostEventSource, ensureHostApiToken } from './host-api';
import type {
TeacherModelCatalog,
TeacherAvailability,
TeacherCheckInInput,
TeacherCheckInResult,
@@ -24,6 +25,7 @@ export function legacyTopicBase(base: string, legacyFriend: boolean) {
return legacyFriend ? base.replace(/agent-topics$/, 'friend-topics') : base;
}
export const teacherApi = {
models: (runtime: 'local' | 'yuxi') => hostApiFetch<TeacherModelCatalog>('/api/coding/teacher/models?runtime=' + runtime),
legacyHistory: (projectId: string) => hostApiFetch<TeacherTopicList>(`/api/coding/projects/${encodeURIComponent(projectId)}/agent-history`),
legacyRead: (projectId: string, item: TeacherTopicList['items'][number]) => hostApiFetch<TeacherTopic>(
`/api/coding/projects/${encodeURIComponent(projectId)}/agent-history/${encodeURIComponent(item.id)}?source=${encodeURIComponent(item.legacySourceId ?? 'project')}&friend=${item.legacyRole === 'friend'}`),