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
+1 -31
View File
@@ -11,8 +11,6 @@ import { enqueueMeetingAudioChunk, finishMeetingSession } from './meeting/meetin
import { loginAndLoadKeys } from './auth/authClient'
import { openLoginWindow, closeLoginWindow } from './auth/loginWindow'
import { clearSession, getCurrentUserEmail, isLoggedIn } from './auth/session'
import { getProgress, getModuleDetail, getCourseComplianceReport } from './coach/coachStore'
import { startReviewScheduler } from './coach/reviewScheduler'
import type { VoiceTurnResult } from '../shared/voice'
import type { AuthStatus, LoginResult } from '../shared/auth'
import { logger } from './utils/logger'
@@ -22,8 +20,7 @@ import { startAutoUpdater } from './updater'
let mainWindow: BrowserWindow | null = null
// Empeche de lancer plusieurs instances de Max en parallele (chaque instance ouvrirait sa propre
// fenetre avatar, son propre acces concurrent a la base SQLite et son propre planificateur de
// revisions) : le second lancement se ferme immediatement et reactive la fenetre existante.
// fenetre avatar) : le second lancement se ferme immediatement et reactive la fenetre existante.
if (!app.requestSingleInstanceLock()) {
app.quit()
process.exit(0)
@@ -171,14 +168,6 @@ app
if (window) menu.popup({ window })
})
ipcMain.handle('get-coach-progress', () => getProgress())
ipcMain.handle('get-module-detail', (_event, subject: string, moduleName: string) =>
getModuleDetail(subject, moduleName)
)
ipcMain.handle('get-course-compliance', (_event, subject: string) =>
getCourseComplianceReport(subject)
)
ipcMain.on('meeting-audio-chunk', (_event, audio: ArrayBuffer, mimeType: string) => {
enqueueMeetingAudioChunk(Buffer.from(audio), mimeType)
})
@@ -216,24 +205,6 @@ app
})()
})
ipcMain.on('evaluate-module', (_event, subject: string, moduleName: string) => {
void (async () => {
const prompt = `[Evenement systeme] L'utilisateur a clique sur "Evaluer" pour le module "${moduleName}" du sujet "${subject}". Relis le contenu de ce module (get_course_plan) pour rester coherent avec ce qui a ete enseigne, puis commence immediatement l'evaluation ecrite (ask_written_exercise, kind="module", concept="${moduleName}").`
try {
const reply = await getAssistantReply(prompt)
const speech = await synthesizeSpeech(reply)
const audio = speech.buffer.slice(
speech.byteOffset,
speech.byteOffset + speech.byteLength
) as ArrayBuffer
sendToRenderer('proactive-speech', audio)
} catch (error) {
console.error('[evaluate-module]', error)
}
})()
})
ipcMain.handle(
'voice-turn',
async (_event, inputAudio: ArrayBuffer, mimeType: string): Promise<VoiceTurnResult> => {
@@ -290,7 +261,6 @@ app
}))
createWindow()
startReviewScheduler()
if (!is.dev) startAutoUpdater()
app.on('activate', function () {