feat(archive): rich metadata in semantic search — username/channel/guild context + guild filter

Archive payload now stores username, channel_id, guild_id, thread_id and the
real message created_at (not embed time). Backend searchArray accepts an
optional guildId and applies a Qdrant payload filter so results can be scoped
to the guild being viewed. API/frontend expose the new fields and the
semantic results card shows who said it, in which channel, and when —
turning bare text blobs into contextual results. Old points fall back to
analyzed_at and omit the new fields gracefully.
This commit is contained in:
asepharyana committed 2026-09-01 18:56:14 +07:00
1 parent c704fbf7a5
commit 26a690943d
8 files changed
+84 -8

No files matched your search

+6 -2
View File
@@ -70,8 +70,12 @@ export const messagesApi = {
}>,
// Public semantic search over the persistent message archive (Qdrant).
semanticSearch: (query: string, limit?: number) =>
orpc.messages.semanticSearch({ query, limit }) as unknown as Promise<{
semanticSearch: (query: string, limit?: number, guildId?: string) =>
orpc.messages.semanticSearch({
query,
limit,
...(guildId ? { guildId } : {}),
}) as unknown as Promise<{
results: SemanticSearchResult[];
nextCursor: null;
}>,