From f6190eb2117754bb5e973e7c63099b853f5c362f Mon Sep 17 00:00:00 2001 From: akdeb Date: Wed, 4 Jun 2025 19:31:36 +0100 Subject: [PATCH] adding first message instuctions --- firmware-arduino/src/Config.h | 4 +-- .../CreateCharacter/BuildDashboard.tsx | 29 +++++++++++++----- .../Playground/ModifyCharacterSheet.tsx | 6 ++++ .../app/components/Realtime/App.tsx | 8 ++++- ...armoon_default.jpeg => elato_default.jpeg} | Bin frontend-nextjs/types/types.d.ts | 1 + server-deno/main.ts | 3 +- server-deno/supabase.ts | 23 +++++++++----- server-deno/types.d.ts | 1 + .../20250604180849_add_first_message.sql | 2 ++ supabase/seed.sql | 2 +- 11 files changed, 60 insertions(+), 19 deletions(-) rename frontend-nextjs/public/personality/{starmoon_default.jpeg => elato_default.jpeg} (100%) create mode 100644 supabase/migrations/20250604180849_add_first_message.sql diff --git a/firmware-arduino/src/Config.h b/firmware-arduino/src/Config.h index df66cbf..e4980e5 100644 --- a/firmware-arduino/src/Config.h +++ b/firmware-arduino/src/Config.h @@ -13,9 +13,9 @@ // Pick one of the following (DEV_MODE, PROD_MODE, ELATO_MODE) , comment the rest // For ELATO_MODE, you will need to register your DIY Hardware on the Elato website -// #define DEV_MODE +#define DEV_MODE // #define PROD_MODE -#define ELATO_MODE +// #define ELATO_MODE // ---------- Touch mode ---------- diff --git a/frontend-nextjs/app/components/CreateCharacter/BuildDashboard.tsx b/frontend-nextjs/app/components/CreateCharacter/BuildDashboard.tsx index 9c0febf..175527c 100644 --- a/frontend-nextjs/app/components/CreateCharacter/BuildDashboard.tsx +++ b/frontend-nextjs/app/components/CreateCharacter/BuildDashboard.tsx @@ -29,6 +29,7 @@ const formSchema = z.object({ title: z.string().min(2, "Minimum 2 characters").max(50, "Maximum 50 characters"), description: z.string().min(50, "Minimum 50 characters").max(200, "Maximum 200 characters"), prompt: z.string().min(100, "Minimum 100 characters").max(1000, "Maximum 1000 characters"), + firstMessagePrompt: z.string().min(50, "Minimum 50 characters").max(150, "Maximum 150 characters"), voice: z.string().min(1, "Voice selection is required"), voiceCharacteristics: z.object({ features: z.string().min(10, "Minimum 10 characters").max(150, "Maximum 150 characters"), @@ -41,22 +42,17 @@ type FormData = z.infer; const SettingsDashboard: React.FC = ({ selectedUser, - allLanguages, }) => { const supabase = createClient(); const router = useRouter(); const [currentStep, setCurrentStep] = useState<'personality' | 'voice'>('personality'); const [isSubmitting, setIsSubmitting] = useState(false); - - const [languageState, setLanguageState] = useState( - selectedUser.language_code! // Initial value from props - ); - const [formData, setFormData] = useState({ title: '', description: '', prompt: '', + firstMessagePrompt: '', voice: '', voiceCharacteristics: { features: '', @@ -182,7 +178,8 @@ const SettingsDashboard: React.FC = ({ key: formData.title.toLowerCase().replace(/ /g, '_') + "_" + uuidv4(), creator_id: selectedUser.user_id, short_description: formData.description, - pitch_factor: formData.voiceCharacteristics.pitchFactor + pitch_factor: formData.voiceCharacteristics.pitchFactor, + first_message_prompt: formData.firstMessagePrompt }); if (personality) { @@ -257,6 +254,7 @@ const SettingsDashboard: React.FC = ({ return (
+
{currentStep === 'personality' ? @@ -357,6 +355,23 @@ const SettingsDashboard: React.FC = ({ {formData.prompt.length}/1000

+
+ +