feat: add WebChat adapter for pipeline debugging (#1510)

* feat: add WebChat adapter for pipeline debugging

- Create WebChatAdapter for handling debug messages in pipeline testing
- Add HTTP API endpoints for debug message sending and retrieval
- Implement frontend debug dialog with session switching (private/group chat)
- Add Chinese i18n translations for debug interface
- Auto-create default WebChat bot during database initialization
- Support fixed session IDs: webchatperson and webchatgroup for testing

Co-Authored-By: Junyan Qin <Chin>, 秦骏言 in Chinese, you can call me my english name Rock Chin. <rockchinq@gmail.com>

* perf: ui for webchat

* feat: complete webchat backend

* feat: core chat apis

* perf: button style in pipeline card

* perf: log btn in bot card

* perf: webchat entities definition

* fix: bugs

* perf: web chat

* perf: dialog styles

* perf: styles

* perf: styles

* fix: group invalid in webchat

* perf: simulate real im message

* perf: group timeout toast

* feat(webchat): add supports for mentioning bot in group

* perf(webchat): at component styles

* perf: at badge display in message

* fix: linter errors

* fix: webchat was listed on adapter list

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Junyan Qin <Chin>, 秦骏言 in Chinese, you can call me my english name Rock Chin. <rockchinq@gmail.com>
This commit is contained in:
devin-ai-integration[bot]
2025-06-08 15:34:26 +08:00
committed by GitHub
parent e6bc009414
commit 4f2ec195fc
25 changed files with 1358 additions and 25 deletions

View File

@@ -183,6 +183,7 @@ const enUS = {
'Pipelines define the processing flow for message events, used to bind to bots',
createPipeline: 'Create Pipeline',
editPipeline: 'Edit Pipeline',
chat: 'Chat',
getPipelineListError: 'Failed to get pipeline list: ',
daysAgo: 'days ago',
today: 'Today',
@@ -202,6 +203,25 @@ const enUS = {
deleteConfirmation:
'Are you sure you want to delete this pipeline? Bots bound to this pipeline will not work.',
defaultPipelineCannotDelete: 'Default pipeline cannot be deleted',
debugDialog: {
title: 'Pipeline Chat',
selectPipeline: 'Select Pipeline',
sessionType: 'Session Type',
privateChat: 'Private Chat',
groupChat: 'Group Chat',
send: 'Send',
reset: 'Reset Conversation',
inputPlaceholder: 'Enter message...',
noMessages: 'No messages',
userMessage: 'User',
botMessage: 'Bot',
sendFailed: 'Send failed',
resetSuccess: 'Conversation reset successfully',
resetFailed: 'Reset failed',
loadMessagesFailed: 'Failed to load messages',
loadPipelinesFailed: 'Failed to load pipelines',
atTips: 'Mention the bot',
},
},
register: {
title: 'Initialize LangBot 👋',

View File

@@ -178,6 +178,7 @@ const zhHans = {
description: '流水线定义了对消息事件的处理流程,用于绑定到机器人',
createPipeline: '创建流水线',
editPipeline: '编辑流水线',
chat: '对话',
getPipelineListError: '获取流水线列表失败:',
daysAgo: '天前',
today: '今天',
@@ -197,6 +198,25 @@ const zhHans = {
deleteConfirmation:
'你确定要删除这个流水线吗?已绑定此流水线的机器人将无法使用。',
defaultPipelineCannotDelete: '默认流水线不可删除',
debugDialog: {
title: '流水线对话',
selectPipeline: '选择流水线',
sessionType: '会话类型',
privateChat: '私聊',
groupChat: '群聊',
send: '发送',
reset: '重置对话',
inputPlaceholder: '输入消息...',
noMessages: '暂无消息',
userMessage: '用户',
botMessage: '机器人',
sendFailed: '发送失败',
resetSuccess: '对话已重置',
resetFailed: '重置失败',
loadMessagesFailed: '加载消息失败',
loadPipelinesFailed: '加载流水线失败',
atTips: '提及机器人',
},
},
register: {
title: '初始化 LangBot 👋',