Repository navigation
✨ feat(sources): return a conversation's messages from sources/get - #103
Merged
Merged
Conversation
Transcripts and chats keep their text on conversation_message children, so the parent source read back as empty. With includeContent, sources/get now also returns the child messages in conversation order, with speaker, resolved speaker node, role, and time, plus the host-supplied origin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
POST /sources/getwithincludeContent: truenow also returns aconversationfield for sources that haveconversation_messagechildren (meeting transcripts and chats):sourceKind: the host-supplied origin from the parent's metadata, such asgoogle_meet.messages: each child'ssourceId,speaker,speakerNodeId,role,timestampandtext, in conversation order.conversationisnullwhen the source has no child messages. The source's owncontentis returned unchanged next to it.Why
A transcript's parent source stores no body; each utterance is a child source. Clients that open the parent, such as the Petals source view, showed "No content captured" for every transcript.
Ordering
${transcriptId}:<n>). Untimed utterances get the meeting start as a fallback timestamp, so timestamps cannot order them.The query reads only the needed
metadata->>fields, not the full JSONB. Malformed provenance, such as a bad node id or an invalid timestamp, becomesnulland does not fail the read.Known limit
The response is unbounded. It returns every message, with no cap or pagination. This is fine for meeting-length transcripts. Very long chat histories would make one large payload.
How to test
docker compose up -d db pnpm exec vitest run src/lib/source-conversation src/sources-get-route.test.tsStatus
tsc --noEmit): passsourceKindpnpm run build-sdk: passThe Petals UI that uses this field is ready on a local branch. It needs a published SDK version before it can open as a PR.
🤖 Generated with Claude Code