[NELO-1102] feat(im): add thread-based session mode for IM channels
Add session_mode ("user" | "thread") to IM channel config. In thread
mode, each message thread gets its own session, enabling multi-user
collaboration within the same thread context.
Backend:
- Add SessionMode type constants and validation
- Add ThreadID field to IncomingMessage and ChannelSession
- Split resolveSession into resolveUserSession/resolveThreadSession
- Update makeUserKey to include threadID only in thread mode
- Extract ThreadID in Slack, Mattermost, Feishu, Telegram adapters
- Add message_thread_id to Telegram SendReply/StartStream for Forums
- DB migration 000028: session_mode column + thread_id column + index
Frontend:
- Add session_mode radio group to IMChannelPanel dialog
- Auto-reset session_mode when switching to non-thread platform
- Show thread badge on channel card for thread-mode channels
- Add i18n keys for en-US, ko-KR, zh-CN, ru-RU
This commit is contained in:
@@ -3246,6 +3246,10 @@ export default {
|
||||
fileKnowledgeBase: 'File Storage Knowledge Base',
|
||||
fileKnowledgeBasePlaceholder: 'Select a knowledge base (optional)',
|
||||
fileKnowledgeBaseHint: 'When configured, files sent by users will be automatically saved to this knowledge base',
|
||||
sessionMode: 'Session Mode',
|
||||
sessionModeUser: 'Per User (default)',
|
||||
sessionModeThread: 'Per Thread',
|
||||
sessionModeHint: 'User mode: each person has their own conversation. Use /clear to start fresh. Thread mode: each message thread is a separate conversation. Multiple people can collaborate in the same thread.',
|
||||
},
|
||||
mcp: {
|
||||
label: 'MCP Services',
|
||||
|
||||
@@ -3275,6 +3275,10 @@ export default {
|
||||
fileKnowledgeBase: "파일 저장 지식 베이스",
|
||||
fileKnowledgeBasePlaceholder: "지식 베이스 선택 (선택 사항)",
|
||||
fileKnowledgeBaseHint: "설정 시 사용자가 보낸 파일이 자동으로 해당 지식 베이스에 저장됩니다",
|
||||
sessionMode: "세션 모드",
|
||||
sessionModeUser: "사용자별 (기본)",
|
||||
sessionModeThread: "스레드별",
|
||||
sessionModeHint: "사용자 모드: 각 사용자별 독립 대화. /clear로 새 대화 시작. 스레드 모드: 메시지 스레드별 독립 대화. 같은 스레드에서 여러 명이 함께 대화 가능.",
|
||||
},
|
||||
tools: {
|
||||
thinking: '사고',
|
||||
|
||||
@@ -2908,6 +2908,10 @@ export default {
|
||||
fileKnowledgeBase: 'База знаний для файлов',
|
||||
fileKnowledgeBasePlaceholder: 'Выберите базу знаний (необязательно)',
|
||||
fileKnowledgeBaseHint: 'При настройке файлы, отправленные пользователями, автоматически сохраняются в эту базу знаний',
|
||||
sessionMode: 'Режим сессии',
|
||||
sessionModeUser: 'По пользователю (по умолчанию)',
|
||||
sessionModeThread: 'По потоку',
|
||||
sessionModeHint: 'Режим пользователя: отдельный диалог для каждого пользователя. /clear для нового диалога. Режим потока: отдельный диалог для каждого потока. Несколько человек могут общаться в одном потоке.',
|
||||
},
|
||||
mcp: {
|
||||
label: 'MCP-сервисы',
|
||||
|
||||
@@ -3221,6 +3221,10 @@ export default {
|
||||
fileKnowledgeBase: "文件保存知识库",
|
||||
fileKnowledgeBasePlaceholder: "选择知识库(可选)",
|
||||
fileKnowledgeBaseHint: "配置后,用户发送的文件将自动保存到该知识库中",
|
||||
sessionMode: "会话模式",
|
||||
sessionModeUser: "按用户(默认)",
|
||||
sessionModeThread: "按话题",
|
||||
sessionModeHint: "用户模式:每个用户独立对话,使用 /clear 开始新对话。话题模式:每个消息话题独立对话,同一话题中多人可协作。",
|
||||
},
|
||||
tools: {
|
||||
thinking: "思考",
|
||||
|
||||
Reference in New Issue
Block a user