@@ -50,101 +50,20 @@ import { memoriesApi } from '../api/endpoints/personal-data';
5050import { InferredFactsPanel } from './profile/InferredFactsPanel' ;
5151import type { ProfileData } from '../api' ;
5252import type { Memory } from '../api/types' ;
53+ import {
54+ DEFAULT_QUICK_SETUP ,
55+ AUTONOMY_DESCRIPTIONS ,
56+ AUTONOMY_COLORS ,
57+ COMMUNICATION_STYLES ,
58+ VERBOSITY_OPTIONS ,
59+ LANGUAGES ,
60+ } from './ProfilePage.constants' ;
61+ import type { QuickSetupData , EditableSection , TabId } from './ProfilePage.constants' ;
5362
5463// =============================================================================
5564// Types
5665// =============================================================================
5766
58- interface QuickSetupData {
59- name : string ;
60- nickname : string ;
61- location : string ;
62- timezone : string ;
63- occupation : string ;
64- language : string ;
65- communicationStyle : 'formal' | 'casual' | 'mixed' ;
66- verbosity : 'concise' | 'detailed' | 'mixed' ;
67- autonomyLevel : 'none' | 'low' | 'medium' | 'high' | 'full' ;
68- }
69-
70- interface EditableSection {
71- hobbies : string [ ] ;
72- skills : string [ ] ;
73- goals : { short : string [ ] ; medium : string [ ] ; long : string [ ] } ;
74- favoriteFoods : string [ ] ;
75- dietaryRestrictions : string [ ] ;
76- allergies : string [ ] ;
77- }
78-
79- type TabId = 'home' | 'overview' | 'identity' | 'behavior' | 'memories' | 'advanced' ;
80-
81- // =============================================================================
82- // Constants
83- // =============================================================================
84-
85- const DEFAULT_QUICK_SETUP : QuickSetupData = {
86- name : '' ,
87- nickname : '' ,
88- location : '' ,
89- timezone : Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone ,
90- occupation : '' ,
91- language : navigator . language . split ( '-' ) [ 0 ] || 'en' ,
92- communicationStyle : 'casual' ,
93- verbosity : 'detailed' ,
94- autonomyLevel : 'medium' ,
95- } ;
96-
97- const AUTONOMY_DESCRIPTIONS : Record < string , string > = {
98- none : 'AI always asks before taking any action' ,
99- low : 'AI can read freely, asks for writes' ,
100- medium : 'AI acts freely, asks for destructive actions' ,
101- high : 'AI acts autonomously, rarely asks' ,
102- full : 'Full autonomy - AI makes all decisions' ,
103- } ;
104-
105- const AUTONOMY_COLORS : Record < string , string > = {
106- none : 'text-blue-500 bg-blue-500/10 border-blue-500/20' ,
107- low : 'text-emerald-500 bg-emerald-500/10 border-emerald-500/20' ,
108- medium : 'text-amber-500 bg-amber-500/10 border-amber-500/20' ,
109- high : 'text-orange-500 bg-orange-500/10 border-orange-500/20' ,
110- full : 'text-purple-500 bg-purple-500/10 border-purple-500/20' ,
111- } ;
112-
113- const COMMUNICATION_STYLES : {
114- value : QuickSetupData [ 'communicationStyle' ] ;
115- label : string ;
116- icon : typeof MessageSquare ;
117- desc : string ;
118- } [ ] = [
119- { value : 'formal' , label : 'Formal' , icon : Building , desc : 'Professional and polite' } ,
120- { value : 'casual' , label : 'Casual' , icon : MessageSquare , desc : 'Friendly and relaxed' } ,
121- { value : 'mixed' , label : 'Mixed' , icon : Sparkles , desc : 'Adapts to context' } ,
122- ] ;
123-
124- const VERBOSITY_OPTIONS : { value : QuickSetupData [ 'verbosity' ] ; label : string ; desc : string } [ ] = [
125- { value : 'concise' , label : 'Concise' , desc : 'Brief, to-the-point responses' } ,
126- { value : 'detailed' , label : 'Detailed' , desc : 'Comprehensive explanations' } ,
127- { value : 'mixed' , label : 'Adaptive' , desc : 'Adjusts based on context' } ,
128- ] ;
129-
130- const LANGUAGES = [
131- { code : 'en' , name : 'English' , flag : '🇺🇸' } ,
132- { code : 'tr' , name : 'Turkish' , flag : '🇹🇷' } ,
133- { code : 'de' , name : 'German' , flag : '🇩🇪' } ,
134- { code : 'fr' , name : 'French' , flag : '🇫🇷' } ,
135- { code : 'es' , name : 'Spanish' , flag : '🇪🇸' } ,
136- { code : 'it' , name : 'Italian' , flag : '🇮🇹' } ,
137- { code : 'pt' , name : 'Portuguese' , flag : '🇵🇹' } ,
138- { code : 'ru' , name : 'Russian' , flag : '🇷🇺' } ,
139- { code : 'zh' , name : 'Chinese' , flag : '🇨🇳' } ,
140- { code : 'ja' , name : 'Japanese' , flag : '🇯🇵' } ,
141- { code : 'ko' , name : 'Korean' , flag : '🇰🇷' } ,
142- { code : 'ar' , name : 'Arabic' , flag : '🇸🇦' } ,
143- { code : 'nl' , name : 'Dutch' , flag : '🇳🇱' } ,
144- { code : 'pl' , name : 'Polish' , flag : '🇵🇱' } ,
145- { code : 'sv' , name : 'Swedish' , flag : '🇸🇪' } ,
146- ] ;
147-
14867// =============================================================================
14968// Utility Components
15069// =============================================================================
0 commit comments