diff --git a/changelog.d/fixed-18590-betty-spoken-intro-voice.md b/changelog.d/fixed-18590-betty-spoken-intro-voice.md new file mode 100644 index 0000000000..f600acc16c --- /dev/null +++ b/changelog.d/fixed-18590-betty-spoken-intro-voice.md @@ -0,0 +1 @@ +- **Betty answers a spoken "introduce yourself" by voice.** The intro reply did not carry the reply kind, so it went to the meeting chat even when the request was spoken and voice was on; typed intro requests still get a chat reply. ([#18590](https://github.com/hivecommons/hive/issues/18590)) diff --git a/src/pkg/meetings/betty/betty_test.go b/src/pkg/meetings/betty/betty_test.go index 7a09db841e..fc22525fb4 100644 --- a/src/pkg/meetings/betty/betty_test.go +++ b/src/pkg/meetings/betty/betty_test.go @@ -286,11 +286,11 @@ func TestEngineIntroHelloAndSkip(t *testing.T) { r := newRig(t, testSettings(), &fakeLLM{}) r.e.Observe(Line{Who: "Ana", Text: "Betty, introduce yourself", Spoken: true}) rep := r.reply() - if rep.Trigger != TriggerIntro || !strings.Contains(rep.Text, "Betty Bee from the hive") || !rep.VoiceWanted || rep.Kind != KindChat { - t.Fatalf("intro %+v", rep) + if rep.Trigger != TriggerIntro || !strings.Contains(rep.Text, "Betty Bee from the hive") || !rep.VoiceWanted || rep.Kind != KindVoice { + t.Fatalf("spoken intro must be answered by voice: %+v", rep) } r.e.Observe(Line{Who: "Bo", Text: "who's the bot?"}) - if rep := r.reply(); rep.Trigger != TriggerIntro { + if rep := r.reply(); rep.Trigger != TriggerIntro || rep.VoiceWanted || rep.Kind != KindChat { t.Fatalf("bot question %+v", rep) } r.e.Observe(Line{Who: "Bo", Text: "hey betty"}) diff --git a/src/pkg/meetings/betty/queue.go b/src/pkg/meetings/betty/queue.go index af97c58799..d6b6f4d4f0 100644 --- a/src/pkg/meetings/betty/queue.go +++ b/src/pkg/meetings/betty/queue.go @@ -113,7 +113,7 @@ func (e *Engine) onLine(l Line) { } switch { case trig.Intro: - e.emit(Reply{Text: e.s.Persona.Intro(), Trigger: TriggerIntro, Question: l.Text, VoiceWanted: trig.VoiceWanted}) + e.emit(Reply{Kind: replyKind(trig), Text: e.s.Persona.Intro(), Trigger: TriggerIntro, Question: l.Text, VoiceWanted: trig.VoiceWanted}) case trig.Addressed: e.addressed(l, trig, now) case question: