chore(cleanup): remove old SQLite coach pipeline

The entire local-SQLite Coach teaching pipeline (objective/level/plan/module
agents, course-build stepper, written-exercise and drawing windows, review
scheduler, screen/camera vision capture for blockage detection, and their
renderer views) is retired: it will be replaced by a brand new 7-agent
pipeline living server-side in Max API/Postgres, built in a later step.

Removes src/main/coach/, the coach and vision skill definitions, the coach
renderer views and CourseBuildStepper, drawRoughShapes, useCameraCapture,
the camera-frame IPC bridge, and the shared coach/courseBuild/drawing
types. Strips the corresponding pipeline guard-rails, system-prompt
instructions and IPC handlers from openrouter.ts/index.ts/preload. Drops
the now-unused mermaid/roughjs dependencies.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-10-31 19:22:46 +01:00
parent 9aa5abc121
commit 2363dc8164
80 changed files with 24 additions and 8753 deletions
-99
View File
@@ -2,15 +2,6 @@ import { contextBridge, ipcRenderer, webUtils } from 'electron'
import { electronAPI } from '@electron-toolkit/preload'
import type { VoiceTurnResult } from '../shared/voice'
import type { AuthStatus, LoginResult } from '../shared/auth'
import type {
SubjectProgress,
ExerciseForm,
ExerciseFormAnswer,
ModuleDetail,
CourseComplianceReport
} from '../shared/coach'
import type { DrawShape } from '../shared/drawing'
import type { CourseBuildState } from '../shared/courseBuild'
const api = {
setIgnoreMouseEvents: (ignore: boolean, options?: { forward: boolean }): void => {
@@ -44,87 +35,6 @@ const api = {
sendMeetingRecordingStopped: (): void => {
ipcRenderer.send('meeting-recording-stopped')
},
getCoachProgress: (): Promise<SubjectProgress[]> => ipcRenderer.invoke('get-coach-progress'),
getModuleDetail: (subject: string, moduleName: string): Promise<ModuleDetail | null> =>
ipcRenderer.invoke('get-module-detail', subject, moduleName),
getCourseCompliance: (subject: string): Promise<CourseComplianceReport | null> =>
ipcRenderer.invoke('get-course-compliance', subject),
requestModuleEvaluation: (subject: string, moduleName: string): void => {
ipcRenderer.send('evaluate-module', subject, moduleName)
},
onNavigateToModule: (
callback: (target: { subject: string; module: string }) => void
): (() => void) => {
const handler = (
_event: Electron.IpcRendererEvent,
target: { subject: string; module: string }
): void => callback(target)
ipcRenderer.on('navigate-to-module', handler)
return () => ipcRenderer.removeListener('navigate-to-module', handler)
},
onCourseBuildStep: (callback: (state: CourseBuildState | null) => void): (() => void) => {
const handler = (_event: Electron.IpcRendererEvent, state: CourseBuildState | null): void =>
callback(state)
ipcRenderer.on('course-build-step', handler)
return () => ipcRenderer.removeListener('course-build-step', handler)
},
onAskWrittenForm: (callback: (form: ExerciseForm) => void): (() => void) => {
const handler = (_event: Electron.IpcRendererEvent, form: ExerciseForm): void => callback(form)
ipcRenderer.on('ask-written-form', handler)
return () => ipcRenderer.removeListener('ask-written-form', handler)
},
submitWrittenForm: (requestId: string, answers: ExerciseFormAnswer[]): void => {
ipcRenderer.send('written-form-result', requestId, answers)
},
onInitDrawing: (
callback: (init: { title: string; width: number; height: number }) => void
): (() => void) => {
const handler = (
_event: Electron.IpcRendererEvent,
init: { title: string; width: number; height: number }
): void => callback(init)
ipcRenderer.on('init-drawing', handler)
return () => ipcRenderer.removeListener('init-drawing', handler)
},
onRevealShape: (
callback: (payload: { requestId: string; shape: DrawShape; audio: ArrayBuffer | null }) => void
): (() => void) => {
const handler = (
_event: Electron.IpcRendererEvent,
payload: { requestId: string; shape: DrawShape; audio: ArrayBuffer | null }
): void => callback(payload)
ipcRenderer.on('reveal-shape', handler)
return () => ipcRenderer.removeListener('reveal-shape', handler)
},
acknowledgeShapeReveal: (requestId: string): void => {
ipcRenderer.send('shape-reveal-done', requestId)
},
onRenderMermaid: (
callback: (payload: { requestId: string; title: string; mermaidCode: string }) => void
): (() => void) => {
const handler = (
_event: Electron.IpcRendererEvent,
payload: { requestId: string; title: string; mermaidCode: string }
): void => callback(payload)
ipcRenderer.on('render-mermaid', handler)
return () => ipcRenderer.removeListener('render-mermaid', handler)
},
acknowledgeMermaidRendered: (requestId: string, ok: boolean, error?: string): void => {
ipcRenderer.send('mermaid-render-done', requestId, ok, error)
},
onPlayCaption: (
callback: (payload: { requestId: string; audio: ArrayBuffer }) => void
): (() => void) => {
const handler = (
_event: Electron.IpcRendererEvent,
payload: { requestId: string; audio: ArrayBuffer }
): void => callback(payload)
ipcRenderer.on('play-caption', handler)
return () => ipcRenderer.removeListener('play-caption', handler)
},
acknowledgeCaptionDone: (requestId: string): void => {
ipcRenderer.send('caption-done', requestId)
},
onProactiveSpeech: (callback: (audio: ArrayBuffer) => void): (() => void) => {
const handler = (_event: Electron.IpcRendererEvent, audio: ArrayBuffer): void => callback(audio)
ipcRenderer.on('proactive-speech', handler)
@@ -134,15 +44,6 @@ const api = {
sendDroppedFiles: (paths: string[]): void => {
ipcRenderer.send('dropped-files', paths)
},
onCaptureCameraFrame: (callback: (requestId: string) => void): (() => void) => {
const handler = (_event: Electron.IpcRendererEvent, requestId: string): void =>
callback(requestId)
ipcRenderer.on('capture-camera-frame', handler)
return () => ipcRenderer.removeListener('capture-camera-frame', handler)
},
sendCameraFrameResult: (requestId: string, dataUrl: string | null): void => {
ipcRenderer.send('camera-frame-result', requestId, dataUrl)
},
onUpdateAvailable: (callback: () => void): (() => void) => {
const handler = (): void => callback()
ipcRenderer.on('update:available', handler)