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
+20
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 👋',