From ed6c3d09aea6a1bbbdbcfe01aa9c70bf37363370 Mon Sep 17 00:00:00 2001 From: Andy Anderson Date: Mon, 16 Nov 2026 20:55:15 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Betty=20answers=20a=20spoken=20i?= =?UTF-8?q?ntro=20by=20voice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The intro Reply was built without Kind: replyKind(trig), so it defaulted to chat even when the line was spoken and voice was wanted. The other reply paths already set it. Part of hivecommons/hive#18590 Signed-off-by: Andy Anderson --- changelog.d/fixed-18590-betty-spoken-intro-voice.md | 1 + src/pkg/meetings/betty/betty_test.go | 6 +++--- src/pkg/meetings/betty/queue.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 changelog.d/fixed-18590-betty-spoken-intro-voice.md 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: