mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 09:15:41 +08:00
fix: 修复 AI 检索 Evidence 覆盖与加载更多问题
修复问一问微信查询遗漏群聊的问题 区分会话覆盖与发送者覆盖策略 新增问一问微信加载更多功能
This commit is contained in:
1 parent
4058a817dd
commit
c89c108098
14 files changed
+484
-65
No files matched your search
@@ -55,6 +55,16 @@ function looksLikeOpaqueSenderId(value: string | undefined): boolean {
|
||||
)
|
||||
}
|
||||
|
||||
function conversationAliases(contact: { md5: string; m_nsUsrName: string }): string[] {
|
||||
return Array.from(
|
||||
new Set(
|
||||
[contact.md5, contact.m_nsUsrName, `Chat_${contact.md5}`]
|
||||
.map((value) => String(value || '').trim())
|
||||
.filter(Boolean)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
function groupMemberDisplayName(member: chat.GroupSnapshot['members'][number]): string {
|
||||
return (
|
||||
[member.groupNickname, member.wechatNickname, member.nickname, member.remark]
|
||||
@@ -442,7 +452,9 @@ export class KnowledgeSearchService {
|
||||
const contacts = await this.listContacts()
|
||||
const allowedConversations = new Set(request.conversationIds || [])
|
||||
const sourceContacts = allowedConversations.size
|
||||
? contacts.filter((contact) => allowedConversations.has(contact.md5))
|
||||
? contacts.filter((contact) =>
|
||||
conversationAliases(contact).some((alias) => allowedConversations.has(alias))
|
||||
)
|
||||
: contacts
|
||||
const senderIds = new Set(request.senderIds || [])
|
||||
const terms = request.terms.filter((term) => term.trim().length >= 2)
|
||||
|
||||
Reference in new issue
Block a user