mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-17 03:40:46 +08:00
feat(context-enhancement): 新增 chatId 与 threadId 来源字段 (#128)
Add chatId and threadId source fields across all nine IM channels, update UI/docs/tests, reconcile the latest main branch, and credit @Chan-0312 as a contributor.
This commit is contained in:
parent
3c71712962
commit
3562b9244e
19 changed files with 266 additions and 158 deletions
|
|
@ -683,11 +683,14 @@ export class TextHarnessBridge {
|
|||
let contextEnhanced = false;
|
||||
if (snapshot) {
|
||||
const originalContent = content ?? text;
|
||||
const contextSource = message.contextSource?.();
|
||||
content = enhanceContextContent(originalContent, snapshot, () => ({
|
||||
channel: this.#descriptor.key,
|
||||
senderId,
|
||||
senderName: message.contextSource?.()?.senderName,
|
||||
conversationTitle: message.contextSource?.()?.conversationTitle,
|
||||
senderName: contextSource?.senderName,
|
||||
conversationTitle: contextSource?.conversationTitle,
|
||||
chatId: contextSource?.chatId ?? message.conversationId,
|
||||
threadId: contextSource?.threadId,
|
||||
}));
|
||||
contextEnhanced = content !== originalContent;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue