- Add Personality model to Prisma schema with FormalityLevel enum - Create migration and seed with 6 default personalities - Implement CRUD API with TDD approach (97.67% coverage) * PersonalitiesService: findAll, findOne, findDefault, create, update, remove * PersonalitiesController: REST endpoints with auth guards * Comprehensive test coverage (21 passing tests) - Add Personality types to shared package - Create frontend components: * PersonalitySelector: dropdown for choosing personality * PersonalityPreview: preview personality style and system prompt * PersonalityForm: create/edit personalities with validation * Settings page: manage personalities with CRUD operations - Integrate with Ollama API: * Support personalityId in chat endpoint * Auto-inject system prompt from personality * Fall back to default personality if not specified - API client for frontend personality management All tests passing with 97.67% backend coverage (exceeds 85% requirement)
16 lines
399 B
TypeScript
16 lines
399 B
TypeScript
import { Personality as PrismaPersonality, FormalityLevel } from "@prisma/client";
|
|
|
|
export class Personality implements PrismaPersonality {
|
|
id!: string;
|
|
workspaceId!: string;
|
|
name!: string;
|
|
description!: string | null;
|
|
tone!: string;
|
|
formalityLevel!: FormalityLevel;
|
|
systemPromptTemplate!: string;
|
|
isDefault!: boolean;
|
|
isActive!: boolean;
|
|
createdAt!: Date;
|
|
updatedAt!: Date;
|
|
}
|