Route home/back greetings to welcome back

This commit is contained in:
Jacob Dubin
2026-05-21 12:10:58 -05:00
parent c3b2e5fc2c
commit 303d8830b0
2 changed files with 15 additions and 1 deletions

View File

@@ -807,7 +807,19 @@ public sealed partial class JiboInteractionService
if (MatchesAny(loweredTranscript, "news", "headlines", "news update", "tell me the news")) return "news";
if (IsWelcomeBackGreeting(loweredTranscript)) return "welcome_back";
if (IsWelcomeBackGreeting(loweredTranscript) ||
MatchesAny(
loweredTranscript,
"i'm home",
"im home",
"i am home",
"i'm back",
"im back",
"i am back",
"i'm here",
"im here",
"i am here"))
return "welcome_back";
if (IsGoodMorningGreeting(loweredTranscript)) return "good_morning";

View File

@@ -960,6 +960,8 @@ public sealed class JiboInteractionServiceTests
[Theory]
[InlineData("welcome back", "welcome_back", "it's nice to be here")]
[InlineData("i'm home", "welcome_back", "it's nice to be here")]
[InlineData("i'm back", "welcome_back", "it's nice to be here")]
[InlineData("what are you thinking", "robot_what_are_you_thinking", "thinking about how fun, yet scary")]
[InlineData("what have you been doing", "robot_what_have_you_been_doing", "mostly roboting")]
[InlineData("what did you do", "robot_what_did_you_do", "robot stuff")]