Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
fix(teamhub): give the live voice only the Agent's own words from task reports
muterC74cbd3157c4c
diff --git a/apps/teamhub/internal/taskexecution/attempt_reconcile.go b/apps/teamhub/internal/taskexecution/attempt_reconcile.goindex b5548b0a..50c2fd4d 100644--- a/apps/teamhub/internal/taskexecution/attempt_reconcile.go+++ b/apps/teamhub/internal/taskexecution/attempt_reconcile.go@@ -274,6 +274,17 @@ func taskDoneReminder(taskID string) string {"ordinary message what the user should add or check, if anything."}+// ReportReply is the Agent's own words in an idle Task report, without the+// first line that tells the Meta what to do with them. Any other report is+// returned whole.+func ReportReply(report string) string {+ header, reply, found := strings.Cut(report, "\n")+ if found && strings.HasPrefix(header, "Task ") && strings.Contains(header, ") is idle. If it is done, deliver it") {+ return reply+ }+ return report+}+func failTaskAttempt(ctx context.Context,queries *store.Queries,diff --git a/apps/teamhub/internal/taskexecution/attempt_reconcile_test.go b/apps/teamhub/internal/taskexecution/attempt_reconcile_test.goindex f905e155..5cb12801 100644--- a/apps/teamhub/internal/taskexecution/attempt_reconcile_test.go+++ b/apps/teamhub/internal/taskexecution/attempt_reconcile_test.go@@ -113,3 +113,18 @@ func TestInspectCurrentAttemptRunsKeepsTheReportedRunAndError(t *testing.T) {t.Fatalf("activation failure=%+v err=%v", result, err)}}++func TestReportReplyDropsOnlyTheMetaReminder(t *testing.T) {+ idle := "Task Find ticket prices (workitem_1) is idle. " + taskDoneReminder("workitem_1") + "\nAdult tickets are 190.\nBook ahead."+ if got := ReportReply(idle); got != "Adult tickets are 190.\nBook ahead." {+ t.Fatalf("idle report: %q", got)+ }+ failed := "Task Find ticket prices (workitem_1) failed: the site was down"+ if got := ReportReply(failed); got != failed {+ t.Fatalf("failed report: %q", got)+ }+ plain := "Task one\nsecond line"+ if got := ReportReply(plain); got != plain {+ t.Fatalf("other text: %q", got)+ }+}diff --git a/apps/teamhub/internal/voice/voice_live_tasks.go b/apps/teamhub/internal/voice/voice_live_tasks.goindex dad32300..e157900e 100644--- a/apps/teamhub/internal/voice/voice_live_tasks.go+++ b/apps/teamhub/internal/voice/voice_live_tasks.go@@ -54,7 +54,7 @@ func (s *Service) voiceLiveTaskViews(ctx context.Context, session voicelive.Sess// The live voice coordinates the task: it gets the AlterEgo's own// words, without what a Meta is reminded to do with them.records[index].Report = &voicelive.TaskReport{- ID: row.ReportID, Body: row.ReportBody, Delivered: row.ReportDelivered,+ ID: row.ReportID, Body: taskexecution.ReportReply(row.ReportBody), Delivered: row.ReportDelivered,}}if row.RunID != "" {