Skip to content

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.

feat(voice): call quick notes the meeting summary and give it to Grok Live

muterC72c27b16ff93
diff --git a/apps/teamhub/internal/collaboration/message_content_test.go b/apps/teamhub/internal/collaboration/message_content_test.go
index 5b97dd1c..25f2f3cc 100644
--- a/apps/teamhub/internal/collaboration/message_content_test.go
+++ b/apps/teamhub/internal/collaboration/message_content_test.go
@@ -29,7 +29,7 @@ func TestNormalizeMessageCreateRequest(t *testing.T) {
{name: "reconstruction mismatch", request: `{"raw_message":"one","segments":[{"type":"text","content":"two"}]}`, wantInvalid: true},
{name: "invalid skill token", request: `{"raw_message":"summarize","segments":[{"type":"skill","content":"summarize","target":"agent_reviewer","skill_id":"skill_summarize","manifest_version":"1.0.0"}]}`, wantInvalid: true},
{name: "client supplied file metadata", request: `{"raw_message":"report","segments":[{"type":"file","content":"report","document_id":"document_1","document_version_id":"version_1","filename":"spoof.pdf","media_type":"application/pdf"}]}`, wantInvalid: true},
- {name: "Human meeting notes rejected", request: `{"raw_message":"Quick notes","segments":[{"type":"meeting_notes","content":"Quick notes","capture_id":"capture_1"}]}`, wantInvalid: true},
+ {name: "Human meeting notes rejected", request: `{"raw_message":"Meeting summary","segments":[{"type":"meeting_notes","content":"Meeting summary","capture_id":"capture_1"}]}`, wantInvalid: true},
{name: "invalid Document presentation", request: `{"raw_message":"report","segments":[{"type":"document","content":"report","document_id":"document_1","presentation":"banner"}]}`, wantInvalid: true},
}
for _, test := range tests {
@@ -126,8 +126,8 @@ func TestStoredArtifactTreeMessageCanBeReadAndForwarded(t *testing.T) {
}
func TestStoredMeetingNotesReadAndForwardAsText(t *testing.T) {
- encoded := []byte(`[{"type":"document","content":"source.m4a","document_id":"document_1","presentation":"card"},{"type":"meeting_notes","content":"Quick notes","capture_id":"capture_1"}]`)
- raw := "source.m4aQuick notes"
+ encoded := []byte(`[{"type":"document","content":"source.m4a","document_id":"document_1","presentation":"card"},{"type":"meeting_notes","content":"Meeting summary","capture_id":"capture_1"}]`)
+ raw := "source.m4aMeeting summary"
stored, err := storedMessageContent(raw, encoded)
if err != nil || len(stored.segments) != 2 {
t.Fatalf("stored=%+v err=%v", stored, err)
diff --git a/apps/teamhub/internal/store/queries/voice_live.sql b/apps/teamhub/internal/store/queries/voice_live.sql
index 58433089..e69f2c2e 100644
--- a/apps/teamhub/internal/store/queries/voice_live.sql
+++ b/apps/teamhub/internal/store/queries/voice_live.sql
@@ -337,7 +337,12 @@ SELECT message.id,message.author_actor_id,author.display_name AS author,author.k
ARRAY(SELECT DISTINCT reference->>'document_id' FROM agent_history_messages history
CROSS JOIN LATERAL jsonb_array_elements(history.resource_references) reference
WHERE history.message_id=message.id AND history.tenant_id=message.tenant_id
- ORDER BY reference->>'document_id')::text[] AS document_ids
+ ORDER BY reference->>'document_id')::text[] AS document_ids,
+ -- A recording's meeting summary is a card whose text lives on its Capture;
+ -- the live voice reads it here instead of only the card's label.
+ coalesce((SELECT capture.quick_notes FROM jsonb_array_elements(message.segments) segment
+ JOIN capture_sessions capture ON capture.id=segment->>'capture_id' AND capture.tenant_id=message.tenant_id
+ WHERE segment->>'type'='meeting_notes' AND capture.quick_notes_state='ready' LIMIT 1),'null'::jsonb)::jsonb AS meeting_summary
FROM messages message JOIN actors author ON author.id=message.author_actor_id
WHERE message.room_id=sqlc.arg(room_id)::text AND message.message_kind='conversation'
ORDER BY message.created_at DESC,message.id DESC LIMIT 20;
diff --git a/apps/teamhub/internal/store/voice_live.sql.go b/apps/teamhub/internal/store/voice_live.sql.go
index 09e1d597..2318bde6 100644
--- a/apps/teamhub/internal/store/voice_live.sql.go
+++ b/apps/teamhub/internal/store/voice_live.sql.go
@@ -731,21 +731,27 @@ SELECT message.id,message.author_actor_id,author.display_name AS author,author.k
ARRAY(SELECT DISTINCT reference->>'document_id' FROM agent_history_messages history
CROSS JOIN LATERAL jsonb_array_elements(history.resource_references) reference
WHERE history.message_id=message.id AND history.tenant_id=message.tenant_id
- ORDER BY reference->>'document_id')::text[] AS document_ids
+ ORDER BY reference->>'document_id')::text[] AS document_ids,
+ -- A recording's meeting summary is a card whose text lives on its Capture;
+ -- the live voice reads it here instead of only the card's label.
+ coalesce((SELECT capture.quick_notes FROM jsonb_array_elements(message.segments) segment
+ JOIN capture_sessions capture ON capture.id=segment->>'capture_id' AND capture.tenant_id=message.tenant_id
+ WHERE segment->>'type'='meeting_notes' AND capture.quick_notes_state='ready' LIMIT 1),'null'::jsonb)::jsonb AS meeting_summary
FROM messages message JOIN actors author ON author.id=message.author_actor_id
WHERE message.room_id=$1::text AND message.message_kind='conversation'
ORDER BY message.created_at DESC,message.id DESC LIMIT 20
`
type ListVoiceLiveHandoverMessagesRow struct {
- ID string `json:"id"`
- AuthorActorID string `json:"author_actor_id"`
- Author string `json:"author"`
- AuthorKind string `json:"author_kind"`
- CreatedAt pgtype.Timestamptz `json:"created_at"`
- Body string `json:"body"`
- Truncated bool `json:"truncated"`
- DocumentIds []string `json:"document_ids"`
+ ID string `json:"id"`
+ AuthorActorID string `json:"author_actor_id"`
+ Author string `json:"author"`
+ AuthorKind string `json:"author_kind"`
+ CreatedAt pgtype.Timestamptz `json:"created_at"`
+ Body string `json:"body"`
+ Truncated bool `json:"truncated"`
+ DocumentIds []string `json:"document_ids"`
+ MeetingSummary []byte `json:"meeting_summary"`
}
func (q *Queries) ListVoiceLiveHandoverMessages(ctx context.Context, roomID string) ([]ListVoiceLiveHandoverMessagesRow, error) {
@@ -766,6 +772,7 @@ func (q *Queries) ListVoiceLiveHandoverMessages(ctx context.Context, roomID stri
&i.Body,
&i.Truncated,
&i.DocumentIds,
+ &i.MeetingSummary,
); err != nil {
return nil, err
}
diff --git a/apps/teamhub/internal/voice/capture_completion.go b/apps/teamhub/internal/voice/capture_completion.go
index a4f6ae74..eefa82f6 100644
--- a/apps/teamhub/internal/voice/capture_completion.go
+++ b/apps/teamhub/internal/voice/capture_completion.go
@@ -373,7 +373,7 @@ func captureCompletionSegments(captureID string, audio, transcript document.Vers
if withNotes {
segments = append(segments,
messagecreation.Segment{Type: "text", Content: "\n"},
- messagecreation.Segment{Type: "meeting_notes", Content: "Quick notes", CaptureID: captureID},
+ messagecreation.Segment{Type: "meeting_notes", Content: "Meeting summary", CaptureID: captureID},
)
}
return segments
diff --git a/apps/teamhub/internal/voicelive/meeting_summary_test.go b/apps/teamhub/internal/voicelive/meeting_summary_test.go
new file mode 100644
index 00000000..91015f2a
--- /dev/null
+++ b/apps/teamhub/internal/voicelive/meeting_summary_test.go
@@ -0,0 +1,17 @@
+package voicelive
+
+import "testing"
+
+func TestMeetingSummaryTextWritesTitleAndBullets(t *testing.T) {
+ raw := []byte(`{"title":"Weekly sync","sections":[{"heading":"Product","bullets":["Rebuild ships Monday","Search redesign today"]},{"heading":"Next","bullets":["Test the client"]}]}`)
+ want := "\nMeeting summary: Weekly sync\n- Product: Rebuild ships Monday; Search redesign today\n- Next: Test the client"
+ if got := meetingSummaryText(raw); got != want {
+ t.Fatalf("summary=%q", got)
+ }
+ // A recording without a ready summary adds nothing to its Message.
+ for _, empty := range [][]byte{nil, []byte("null"), []byte(`{"sections":[]}`), []byte("not json")} {
+ if got := meetingSummaryText(empty); got != "" {
+ t.Fatalf("%s gave %q", empty, got)
+ }
+ }
+}
diff --git a/apps/teamhub/internal/voicelive/voicelive.go b/apps/teamhub/internal/voicelive/voicelive.go
index e9a53a40..77f041ea 100644
--- a/apps/teamhub/internal/voicelive/voicelive.go
+++ b/apps/teamhub/internal/voicelive/voicelive.go
@@ -6,6 +6,7 @@ package voicelive
import (
"context"
+ "encoding/json"
"errors"
"regexp"
"strconv"
@@ -18,6 +19,7 @@ import (
"github.com/simplexai-labs/linger/apps/teamhub/internal/messagecreation"
"github.com/simplexai-labs/linger/apps/teamhub/internal/store"
"github.com/simplexai-labs/linger/apps/teamhub/internal/voicemedia"
+ "github.com/simplexai-labs/linger/apps/teamhub/internal/voicequicknotes"
)
var (
@@ -208,11 +210,27 @@ func LoadHistory(ctx context.Context, queries *store.Queries, session Session) (
if row.AuthorKind == "human" {
role = "user"
}
- newestFirst = append(newestFirst, HistoryMessage{Role: role, Text: "[message_id=" + row.ID + " author=" + row.Author + " at=" + row.CreatedAt.Time.Format(time.RFC3339) + " document_ids=" + strings.Join(row.DocumentIds, ",") + " truncated=" + strconv.FormatBool(row.Truncated) + "]\n" + row.Body})
+ newestFirst = append(newestFirst, HistoryMessage{Role: role, Text: "[message_id=" + row.ID + " author=" + row.Author + " at=" + row.CreatedAt.Time.Format(time.RFC3339) + " document_ids=" + strings.Join(row.DocumentIds, ",") + " truncated=" + strconv.FormatBool(row.Truncated) + "]\n" + row.Body + meetingSummaryText(row.MeetingSummary)})
}
return recentHistory(newestFirst), nil
}
+// meetingSummaryText writes a ready meeting summary under its card, so the
+// live voice answers from it without a tool call. Anything unreadable adds
+// nothing: the card's label still says a summary exists.
+func meetingSummaryText(raw []byte) string {
+ var summary voicequicknotes.Notes
+ if len(raw) == 0 || json.Unmarshal(raw, &summary) != nil || summary.Title == "" {
+ return ""
+ }
+ var text strings.Builder
+ text.WriteString("\nMeeting summary: " + summary.Title)
+ for _, section := range summary.Sections {
+ text.WriteString("\n- " + section.Heading + ": " + strings.Join(section.Bullets, "; "))
+ }
+ return text.String()
+}
+
// recentHistory preserves separate messages and unanswered questions. The
// receiving model can fetch older messages using the supplied message IDs.
func recentHistory(newestFirst []HistoryMessage) []HistoryMessage {
diff --git a/apps/teamhub/migrations/00878_meeting_summary_label.sql b/apps/teamhub/migrations/00878_meeting_summary_label.sql
new file mode 100644
index 00000000..c56ae0d2
--- /dev/null
+++ b/apps/teamhub/migrations/00878_meeting_summary_label.sql
@@ -0,0 +1,18 @@
+-- +goose Up
+-- A recording's card is labelled Meeting summary; older Messages, which
+-- the Agent history view reads, still say Quick notes.
+UPDATE messages
+SET segments = (
+ SELECT jsonb_agg(
+ CASE WHEN item.segment->>'type' = 'meeting_notes' AND item.segment->>'content' = 'Quick notes'
+ THEN jsonb_set(item.segment, '{content}', '"Meeting summary"')
+ ELSE item.segment END
+ ORDER BY item.position)
+ FROM jsonb_array_elements(messages.segments) WITH ORDINALITY AS item(segment, position)),
+ body = regexp_replace(body, 'Quick notes$', 'Meeting summary')
+WHERE segments @> '[{"type": "meeting_notes", "content": "Quick notes"}]';
+
+-- +goose Down
+-- +goose StatementBegin
+DO $$ BEGIN RAISE EXCEPTION 'the Meeting summary label is forward-only'; END $$;
+-- +goose StatementEnd
diff --git a/apps/web/src/features/rooms/cards/creation-message-preview.tsx b/apps/web/src/features/rooms/cards/creation-message-preview.tsx
index 9bce1355..ea659fda 100644
--- a/apps/web/src/features/rooms/cards/creation-message-preview.tsx
+++ b/apps/web/src/features/rooms/cards/creation-message-preview.tsx
@@ -99,7 +99,7 @@ export function CreationMessagePreview({
) : segment.type === "html_fragment" ? (
<span>{segment.content}</span>
) : segment.type === "meeting_notes" ? (
- <span>Quick notes</span>
+ <span>Meeting summary</span>
) : segment.type === "document" ? (
<span>Document: {segment.content}</span>
) : segment.type === "artifact_tree" ? (
diff --git a/apps/web/src/features/rooms/chat/message-body-blocks.test.ts b/apps/web/src/features/rooms/chat/message-body-blocks.test.ts
index c8cc9565..b50d223a 100644
--- a/apps/web/src/features/rooms/chat/message-body-blocks.test.ts
+++ b/apps/web/src/features/rooms/chat/message-body-blocks.test.ts
@@ -91,7 +91,7 @@ describe("messageBodyBlocks", () => {
it("sets a recording's quick notes apart from the text around them", () => {
const notes = {
capture_id: "capture_launch",
- content: "Quick notes",
+ content: "Meeting summary",
type: "meeting_notes" as const,
};
expect(
diff --git a/apps/web/src/features/rooms/chat/message-meeting-notes.test.tsx b/apps/web/src/features/rooms/chat/message-meeting-notes.test.tsx
index 9fbe1707..85036b4b 100644
--- a/apps/web/src/features/rooms/chat/message-meeting-notes.test.tsx
+++ b/apps/web/src/features/rooms/chat/message-meeting-notes.test.tsx
@@ -17,7 +17,7 @@ type QuickNotes = NonNullable<TeamHubVoiceCapture["quick_notes"]>;
const segment: TeamHubMessageMeetingNotesSegment = {
type: "meeting_notes",
- content: "Quick notes",
+ content: "Meeting summary",
capture_id: "capture_launch",
};
@@ -169,7 +169,7 @@ describe("MessageMeetingNotes", () => {
screen.queryByText("Pulling the key points out of the transcript…"),
).toBeNull(),
);
- expect(screen.queryByText("Quick notes")).toBeNull();
+ expect(screen.queryByText("Meeting summary")).toBeNull();
expect(
screen.getByRole("link", { name: "Library › Meetings" }),
).toBeInTheDocument();
diff --git a/apps/web/src/features/rooms/chat/message-meeting-notes.tsx b/apps/web/src/features/rooms/chat/message-meeting-notes.tsx
index 0d3ed0ef..5b3dd7e9 100644
--- a/apps/web/src/features/rooms/chat/message-meeting-notes.tsx
+++ b/apps/web/src/features/rooms/chat/message-meeting-notes.tsx
@@ -77,14 +77,14 @@ export function MessageMeetingNotes({
}
return (
<section
- aria-label="Quick notes"
+ aria-label="Meeting summary"
className="w-full max-w-[var(--chat-card-width)] overflow-hidden rounded-xl border border-app-border bg-app-surface shadow-[var(--chat-card-shadow)]"
>
{notes?.state === "ready" && notes.title && notes.sections ? (
<div className="px-4 pt-3 pb-1">
<p className="flex items-center gap-1 text-[11.5px] font-semibold uppercase tracking-wide text-app-muted">
<Icon icon={SparklesIcon} size={12} />
- Quick notes
+ Meeting summary
</p>
<h3 className="mt-1 text-[16px] font-semibold leading-6 text-app-ink [overflow-wrap:anywhere]">
{notes.title}
diff --git a/docs/voice.md b/docs/voice.md
index 662ddf06..d24636ac 100644
--- a/docs/voice.md
+++ b/docs/voice.md
@@ -52,9 +52,11 @@ another computer needs an HTTPS proxy in front of port 3000.
## When a recording ends
As soon as a recording stops, Another Me posts the recording and its
-transcript in its chat. Quick notes follow under them a few seconds later: a
-title and a few topics with short bullets, written from the transcript by your
-Another Me's model. The full meeting notes (summary, decisions, action items)
-take a few minutes more and appear in Library › Meetings; the card says so and
-links to them once they are written. If the quick notes cannot be written, the
-recording and transcript stay as they are.
+transcript in its chat. A meeting summary follows under them a few seconds
+later: a title and a few topics with short bullets, written from the transcript
+by your Another Me's model. Grok Live reads the summaries of the recordings
+among the chat's recent messages, so it can answer about a meeting that just
+ended without opening its transcript. The full meeting notes (summary,
+decisions, action items) take a few minutes more and appear in Library ›
+Meetings; the card says so and links to them once they are written. If the
+summary cannot be written, the recording and transcript stay as they are.