-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
117 lines (108 loc) · 3.06 KB
/
types.ts
File metadata and controls
117 lines (108 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import React from 'react';
export interface PersonaProfile {
id: string;
name: string;
age: number;
gender: string;
location: string;
occupation: {
title: string;
industry: string;
experience: number;
income: string;
};
personality: {
openness: number;
conscientiousness: number;
extraversion: number;
agreeableness: number;
neuroticism: number;
};
preferences: {
interests: string[];
hobbies: string[];
values: string[];
lifestyle: string;
};
behaviors: {
communication_style: string;
decision_making: string;
technology_adoption: string;
shopping_habits: string[];
};
goals: {
short_term: string[];
long_term: string[];
fears: string[];
aspirations: string[];
};
background: {
education: string;
family_status: string;
life_stage: string;
experiences: string[];
};
generatedSummary: string;
sourceData?: Record<string, string>;
// Enhanced persona fields (optional for backward compatibility)
personality_descriptions?: {
openness: string;
conscientiousness: string;
extraversion: string;
agreeableness: string;
neuroticism: string;
};
applied_fragments?: string[];
fragment_confidence_scores?: Record<string, number>;
communication_patterns?: string[];
participation_level?: string;
response_length_tendency?: string;
expertise_areas?: string[];
discussion_goals?: string[];
decision_factors?: string[];
pain_points?: string[];
emotional_triggers?: string[];
created_at?: string;
}
export type PartialPersonaProfile = Omit<PersonaProfile, 'id'>;
export enum SimulationType {
FOCUS_GROUP = 'focus_group',
ONE_ON_ONE_INTERVIEW = 'interview',
SURVEY = 'survey',
BRAINSTORMING = 'brainstorming',
PRODUCT_TESTING = 'product_testing',
ADVERTISEMENT_EVALUATION = 'ad_evaluation',
AI_MODERATED_GROUP = 'ai_moderated_group', // New type for autonomous simulation
}
export interface NavItemType {
name: string;
path: string;
icon: React.FC<{ className?: string }>;
}
export interface SimulationTurn {
speaker: 'Moderator' | string; // Persona name or 'Moderator'
text: string;
content?: string; // Enhanced backend uses 'content' instead of 'text'
timestamp: string; // ISO string for date
turn_number?: number;
persona_id?: string;
validation_score?: number;
}
export type SimulationStatus = 'idle' | 'running' | 'paused' | 'ended';
export interface SimulationSession {
id: string;
topic: string;
personaIds: string[];
transcript: SimulationTurn[];
startTime: string; // ISO string
endTime?: string; // ISO string, optional until simulation ends
simulationType: SimulationType;
// Fields for AI Moderator
researchGoal: string;
discussionGuide: string; // Key questions or topics for the AI moderator
moderatorType: 'AI'; // For now, only AI moderator for autonomous mode
maxTurns: number; // Max number of moderator-led interaction cycles
currentTurnNumber: number;
moderatorTurnCount?: number; // Track moderator turns separately from total turns
status: SimulationStatus;
}