From 3086ad6a6d9507431cb9073921d597648fc8fb6b Mon Sep 17 00:00:00 2001 From: Jacob Dubin Date: Thu, 21 May 2026 23:23:44 -0500 Subject: [PATCH] Adjust idle socket reply delays for sleep and spin commands --- .../Services/ResponsePlanToSocketMessagesMapper.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Application/Services/ResponsePlanToSocketMessagesMapper.cs b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Application/Services/ResponsePlanToSocketMessagesMapper.cs index d7044d4..e63ef7b 100644 --- a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Application/Services/ResponsePlanToSocketMessagesMapper.cs +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Application/Services/ResponsePlanToSocketMessagesMapper.cs @@ -43,6 +43,8 @@ public sealed class ResponsePlanToSocketMessagesMapper string.Equals(plan.IntentName, "photobooth", StringComparison.OrdinalIgnoreCase); var isClockSkillLaunch = string.Equals(skill?.SkillName, "@be/clock", StringComparison.OrdinalIgnoreCase); var isReportSkillLaunch = string.Equals(skill?.SkillName, "report-skill", StringComparison.OrdinalIgnoreCase); + var idleRedirectDelayMs = isSleepCommand ? 150 : isSpinAroundCommand ? 75 : 75; + var idleCompletionDelayMs = isSleepCommand ? 1000 : isSpinAroundCommand ? 750 : 125; var localIntent = ReadSkillPayloadString(skill, "localIntent"); var clockIntent = ReadSkillPayloadString(skill, "clockIntent"); var clockDomain = ReadSkillPayloadString(skill, "domain"); @@ -246,10 +248,10 @@ public sealed class ResponsePlanToSocketMessagesMapper outboundAsrText, outboundRules, entities)), - 75)); + idleRedirectDelayMs)); messages.Add(new SocketReplyPlan( JsonSerializer.Serialize(BuildCompletionOnlySkillPayload(transId, "@be/idle")), - 125)); + idleCompletionDelayMs)); } if (isSettingsLaunch && @@ -1459,4 +1461,4 @@ public sealed class ResponsePlanToSocketMessagesMapper string? SpokenLine); public sealed record SocketReplyPlan(string Text, int DelayMs = 0); -} \ No newline at end of file +}