feat: widgets and ai chat

This commit is contained in:
Rotimi Best
2026-04-27 11:40:38 +01:00
parent ae1801f85f
commit 5717dd8004
391 changed files with 28177 additions and 22467 deletions
+21
View File
@@ -0,0 +1,21 @@
import { AgentRole, type AgentContext } from '../types';
import { buildTeacherSystemPrompt } from './teacher';
import { buildStudentSystemPrompt } from './student';
/**
* Builds a role-aware system prompt for the AI assistant.
* Teacher prompts include Plan/Agent mode instructions and content writing guidelines.
* Student prompts (v2) are read-only focused.
*/
export function buildSystemPrompt(context: AgentContext): string {
switch (context.role) {
case AgentRole.TEACHER:
return buildTeacherSystemPrompt(context);
case AgentRole.STUDENT:
return buildStudentSystemPrompt(context);
default:
return buildTeacherSystemPrompt(context);
}
}
export { buildTeacherSystemPrompt, buildStudentSystemPrompt };