mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-08 23:13:17 +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
|
|
@ -17,6 +17,8 @@ const FIELD_LABELS = Object.freeze({
|
|||
senderId: '发送者标识',
|
||||
senderName: '发送者昵称',
|
||||
conversationTitle: '会话标题',
|
||||
chatId: '会话标识',
|
||||
threadId: '话题标识',
|
||||
botId: '机器人标识',
|
||||
});
|
||||
|
||||
|
|
@ -29,6 +31,14 @@ const FIELD_HELP = Object.freeze({
|
|||
labelKey: 'conversationTitleHelpLabel',
|
||||
text: '该字段不是每个渠道都能提供。钉钉群聊会带上群名。当前消息没有会话标题时,即使已选择该字段,<dsh_im_source> 中也会省略 conversationTitle。',
|
||||
}),
|
||||
chatId: Object.freeze({
|
||||
labelKey: 'chatIdHelpLabel',
|
||||
text: '该字段不是每个渠道都能提供。会话标识用于区分不同的群组或私聊,飞书群聊会带上群 ID。当前消息没有会话标识时,即使已选择该字段,<dsh_im_source> 中也会省略 chatId。',
|
||||
}),
|
||||
threadId: Object.freeze({
|
||||
labelKey: 'threadIdHelpLabel',
|
||||
text: '该字段不是每个渠道都能提供。飞书话题群的消息会带上话题 ID,用于区分同一群组内的不同话题;当前消息不在话题中时,即使已选择该字段,<dsh_im_source> 中也会省略 threadId。',
|
||||
}),
|
||||
});
|
||||
|
||||
const SCOPE_COPY = Object.freeze({
|
||||
|
|
@ -38,6 +48,8 @@ const SCOPE_COPY = Object.freeze({
|
|||
fieldsHelpLabel: '查看群聊来源字段说明',
|
||||
senderNameHelpLabel: '查看群聊发送者昵称字段说明',
|
||||
conversationTitleHelpLabel: '查看群聊会话标题字段说明',
|
||||
chatIdHelpLabel: '查看群聊会话标识字段说明',
|
||||
threadIdHelpLabel: '查看群聊话题标识字段说明',
|
||||
guidanceLabel: '增强提示词',
|
||||
guidanceHelpLabel: '查看群聊增强提示词使用说明',
|
||||
guidanceUsage: '用于告诉模型如何使用当前群聊消息的 <dsh_im_source> 来源字段。只填写正文,插件会自动添加 <dsh_im_source_guidance> 成对标签。',
|
||||
|
|
@ -49,6 +61,8 @@ const SCOPE_COPY = Object.freeze({
|
|||
fieldsHelpLabel: '查看私聊来源字段说明',
|
||||
senderNameHelpLabel: '查看私聊发送者昵称字段说明',
|
||||
conversationTitleHelpLabel: '查看私聊会话标题字段说明',
|
||||
chatIdHelpLabel: '查看私聊会话标识字段说明',
|
||||
threadIdHelpLabel: '查看私聊话题标识字段说明',
|
||||
guidanceLabel: '增强提示词',
|
||||
guidanceHelpLabel: '查看私聊增强提示词使用说明',
|
||||
guidanceUsage: '用于告诉模型如何使用当前私聊消息的 <dsh_im_source> 来源字段。只填写正文,插件会自动添加 <dsh_im_source_guidance> 成对标签。',
|
||||
|
|
|
|||
|
|
@ -292,6 +292,14 @@ const EN = Object.freeze({
|
|||
'查看群聊会话标题字段说明': 'View group conversation title field details',
|
||||
'查看私聊会话标题字段说明': 'View direct conversation title field details',
|
||||
'该字段不是每个渠道都能提供。钉钉群聊会带上群名。当前消息没有会话标题时,即使已选择该字段,<dsh_im_source> 中也会省略 conversationTitle。': 'This field is not available on every channel. DingTalk group chats include the group name. If the current message has no conversation title, <dsh_im_source> omits conversationTitle even when the field is selected.',
|
||||
'会话标识': 'Chat ID',
|
||||
'查看群聊会话标识字段说明': 'View group chat ID field details',
|
||||
'查看私聊会话标识字段说明': 'View direct chat ID field details',
|
||||
'该字段不是每个渠道都能提供。会话标识用于区分不同的群组或私聊,飞书群聊会带上群 ID。当前消息没有会话标识时,即使已选择该字段,<dsh_im_source> 中也会省略 chatId。': 'This field is not available on every channel. The chat ID distinguishes different groups or direct chats, and Feishu group chats include the group ID. If the current message has no chat ID, <dsh_im_source> omits chatId even when the field is selected.',
|
||||
'话题标识': 'Topic ID',
|
||||
'查看群聊话题标识字段说明': 'View group topic ID field details',
|
||||
'查看私聊话题标识字段说明': 'View direct topic ID field details',
|
||||
'该字段不是每个渠道都能提供。飞书话题群的消息会带上话题 ID,用于区分同一群组内的不同话题;当前消息不在话题中时,即使已选择该字段,<dsh_im_source> 中也会省略 threadId。': 'This field is not available on every channel. Messages in a Feishu topic chat carry the topic ID, which distinguishes different topics inside the same group. If the current message is not inside a topic, <dsh_im_source> omits threadId even when the field is selected.',
|
||||
'机器人标识': 'Bot ID',
|
||||
'增强提示词': 'Guidance',
|
||||
'查看增强提示词使用说明': 'View guidance instructions',
|
||||
|
|
@ -319,7 +327,7 @@ const EN = Object.freeze({
|
|||
'上下文增强保存失败,请重试。': 'Could not save context enhancement. Try again.',
|
||||
'请提交完整的上下文增强设置。': 'Submit the complete context enhancement settings.',
|
||||
'群聊和私聊开关必须是布尔值。': 'Group and direct switches must be booleans.',
|
||||
'来源字段只能选择已定义的六个字段。': 'Source fields must be chosen from the six defined fields.',
|
||||
'来源字段只能选择已定义的八个字段。': 'Source fields must be chosen from the eight defined fields.',
|
||||
'保存中…': 'Saving…',
|
||||
'未设置': 'Not set',
|
||||
'工作区修改失败,请重试。': 'Could not update the workspace. Try again.',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue