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(voice): say a send finished and confirm with a full sentence
muterCf07ac672dd23
diff --git a/apps/teamhub/internal/voice/voice_live.go b/apps/teamhub/internal/voice/voice_live.goindex 70e2cd02..d2843754 100644--- a/apps/teamhub/internal/voice/voice_live.go+++ b/apps/teamhub/internal/voice/voice_live.go@@ -386,7 +386,7 @@ func (s *Service) sendVoiceLiveMessage(ctx context.Context, session voicelive.Secase err != nil:return "", err}- return voicelive.Output(map[string]string{"status": "sent", "room": label}), nil+ return voicelive.Output(map[string]string{"status": "sent", "room": label, "next": voicelive.SentNext}), nil}// appendVoiceLivePocketNote adds one line to the session Human's own Pocketdiff --git a/apps/teamhub/internal/voice/voice_live_apps.go b/apps/teamhub/internal/voice/voice_live_apps.goindex dd044a5c..c92e0e65 100644--- a/apps/teamhub/internal/voice/voice_live_apps.go+++ b/apps/teamhub/internal/voice/voice_live_apps.go@@ -378,9 +378,9 @@ func (s *Service) storeVoiceLiveCanvasDraft(ctx context.Context, session voiceliif known, ok := s.knownVoiceLiveDraft(key, canvas); ok && draftID == "" {draftID = known.draftID}- draft, err := s.agentConnectedApps.SaveGmailDraft(+ draft, err := s.agentConnectedApps.SaveGmailCanvasDraft(agentconnectedapps.WithOperationID(ctx, voiceLiveInvocationID(session, request)+step),- app.token, app.connection.ConnectionID, draftID, built.Raw)+ app.token, app.connection.ConnectionID, draftID, built)var domain *agentconnectedapps.Errorif errors.As(err, &domain) {return savedCanvasDraft{}, voicelive.Output(map[string]string{"error": domain.Code, "detail": voicelive.Snippet(domain.Message)}), nil@@ -529,7 +529,7 @@ func (s *Service) sendVoiceLiveEmailCanvas(ctx context.Context, session voicelivif latest, err := s.voiceLiveCanvas(ctx, app.principal, args.DocumentID); err == nil {s.recordVoiceLiveCanvasHeader(ctx, session, request, app.principal, latest, fields, "sent")}- return voicelive.Output(map[string]string{"status": "sent", "to": canvas.fields["to"], "subject": canvas.fields["subject"]}), nil+ return voicelive.Output(map[string]string{"status": "sent", "to": canvas.fields["to"], "subject": canvas.fields["subject"], "next": voicelive.SentNext}), nilcase "failed":return voicelive.Output(map[string]string{"error": "send_failed", "detail": voicelive.Snippet(outcome)}), nil}diff --git a/apps/teamhub/internal/voice/voice_live_slack.go b/apps/teamhub/internal/voice/voice_live_slack.goindex 2f94a968..614d22f0 100644--- a/apps/teamhub/internal/voice/voice_live_slack.go+++ b/apps/teamhub/internal/voice/voice_live_slack.go@@ -140,7 +140,7 @@ func (s *Service) sendVoiceLiveSlack(ctx context.Context, session voicelive.Sess}switch status {case "succeeded":- return voicelive.Output(map[string]string{"status": "sent", "to": where}), nil+ return voicelive.Output(map[string]string{"status": "sent", "to": where, "next": voicelive.SentNext}), nilcase "failed":return voicelive.Output(map[string]string{"error": "send_failed", "detail": voicelive.Snippet(outcome)}), nil}diff --git a/apps/teamhub/internal/voicelive/tools.go b/apps/teamhub/internal/voicelive/tools.goindex d49b4e83..f4843325 100644--- a/apps/teamhub/internal/voicelive/tools.go+++ b/apps/teamhub/internal/voicelive/tools.go@@ -341,6 +341,10 @@ func Output(value any) string {return string(encoded)}+// SentNext tells the live model to report a completed send: without it the+// model can take the result as context and stay silent.+const SentNext = "Tell the user now in one short sentence, in their language, that it was sent and to whom."+// ErrorOutput encodes a structured tool error for the live model.func ErrorOutput(code string) string {return Output(map[string]string{"error": code})@@ -352,7 +356,7 @@ func ErrorOutput(code string) string {func NeedsConfirmation(summary string) string {return Output(map[string]string{"status": "needs_confirmation", "summary": summary,- "next": "Ask the user this now, once, and end your turn; never answer it for them. If the user already said yes to it while this call ran, do not ask again: call again with confirmed=true now. Otherwise call again with confirmed=true only after they say yes in their own next turn. As you call, say a few words in their language that you are doing it, since the action can take a few seconds.",+ "next": "Ask the user this now, once, and end your turn; never answer it for them. If the user already said yes to it while this call ran, do not ask again: call again with confirmed=true now. Otherwise call again with confirmed=true only after they say yes in their own next turn. As you call, say one short complete sentence in their language that you are doing it now, never a single word, since the action can take a few seconds.",})}