move help response to first position in test responses

This commit is contained in:
2026-01-05 12:55:36 +01:00
parent c8aba94879
commit 24ab6f0420

View File

@@ -21,7 +21,16 @@ let responseIndex = 0;
// Static test responses (event proposals)
const staticResponses: TestResponse[] = [
// {{{
// Response 0: Meeting mit Jens - next Friday 14:00
// Response 0: Help response (text only)
{
content:
"Ich bin dein Kalender-Assistent! Du kannst mir einfach sagen, welche Termine du erstellen, ändern oder löschen möchtest. Zum Beispiel:\n\n" +
'• "Erstelle einen Termin für morgen um 15 Uhr"\n' +
'• "Was habe ich nächste Woche vor?"\n' +
'• "Verschiebe das Meeting auf Donnerstag"\n\n' +
"Wie kann ich dir helfen?",
},
// Response 1: Meeting mit Jens - next Friday 14:00
{
content:
"Alles klar! Ich erstelle dir einen Termin für das Meeting mit Jens am nächsten Freitag um 14:00 Uhr:",
@@ -35,7 +44,7 @@ const staticResponses: TestResponse[] = [
},
},
},
// Response 1: Recurring event - every Saturday 10:00
// Response 2: Recurring event - every Saturday 10:00
{
content:
"Verstanden! Ich erstelle einen wiederkehrenden Termin: Jeden Samstag um 10:00 Uhr Badezimmer putzen:",
@@ -50,11 +59,11 @@ const staticResponses: TestResponse[] = [
},
},
},
// Response 2: 2-week overview (DYNAMIC - placeholder)
// Response 3: 2-week overview (DYNAMIC - placeholder)
{ content: "" },
// Response 3: Delete "Meeting mit Jens" (DYNAMIC - placeholder)
// Response 4: Delete "Meeting mit Jens" (DYNAMIC - placeholder)
{ content: "" },
// Response 4: Doctor appointment with description
// Response 5: Doctor appointment with description
{
content:
"Ich habe dir einen Arzttermin eingetragen. Denk daran, deine Versichertenkarte mitzunehmen!",
@@ -68,7 +77,7 @@ const staticResponses: TestResponse[] = [
},
},
},
// Response 5: Birthday - yearly recurring
// Response 6: Birthday - yearly recurring
{
content:
"Geburtstage vergisst man leicht - aber nicht mit mir! Ich habe Mamas Geburtstag eingetragen:",
@@ -83,7 +92,7 @@ const staticResponses: TestResponse[] = [
},
},
},
// Response 6: Gym - recurring for 2 months (8 weeks)
// Response 7: Gym - recurring for 2 months (8 weeks)
{
content:
"Perfekt! Ich habe dein Probetraining eingetragen - jeden Dienstag für die nächsten 2 Monate:",
@@ -98,17 +107,8 @@ const staticResponses: TestResponse[] = [
},
},
},
// Response 7: 1-week overview (DYNAMIC - placeholder)
// Response 8: 1-week overview (DYNAMIC - placeholder)
{ content: "" },
// Response 8: Help response (text only)
{
content:
"Ich bin dein Kalender-Assistent! Du kannst mir einfach sagen, welche Termine du erstellen, ändern oder löschen möchtest. Zum Beispiel:\n\n" +
'• "Erstelle einen Termin für morgen um 15 Uhr"\n' +
'• "Was habe ich nächste Woche vor?"\n' +
'• "Verschiebe das Meeting auf Donnerstag"\n\n' +
"Wie kann ich dir helfen?",
},
// Response 9: Phone call - short appointment (Wednesday, so +2 days = Friday)
{
content:
@@ -165,11 +165,11 @@ async function getTestResponse(
const responseIdx = index % staticResponses.length;
// Dynamic responses: fetch events from DB and format
if (responseIdx === 2) {
if (responseIdx === 3) {
return { content: await getWeeksOverview(eventRepo, userId, 2) };
}
if (responseIdx === 3) {
if (responseIdx === 4) {
// Delete "Meeting mit Jens"
const events = await eventRepo.findByUserId(userId);
const jensEvent = events.find((e) => e.title === "Meeting mit Jens");
@@ -186,7 +186,7 @@ async function getTestResponse(
return { content: "Ich konnte keinen Termin 'Meeting mit Jens' finden." };
}
if (responseIdx === 7) {
if (responseIdx === 8) {
return { content: await getWeeksOverview(eventRepo, userId, 1) };
}