process() — supabase Function Reference
Architecture documentation for the process() function in github-discussion.ts from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/docs/scripts/search/sources/github-discussion.ts lines 107–141
async process() {
const { id, title, updatedAt, body, databaseId } = this.discussion
const checksum = createHash('sha256').update(updatedAt).digest('base64')
const meta = { id, title, updatedAt }
// Currently the discussion post itself is being considered as the answer
// (as opposed to a comment marked as answer)
// So we link the slug to the initial discussion post rather than a comment answer
const slug = `discussion-${databaseId}`
// Format the discussion title + body as markdown for better embeddings + LLM response
const content = `# ${title}\n${body}`
// For now, only a single section is created for GH discussions
// Consider adding multiple if we want to include comments/answers
const sections = [
{
heading: title,
slug,
content,
},
]
this.checksum = checksum
this.meta = meta
this.sections = sections
return {
checksum,
meta,
sections,
}
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free