mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-26 18:35:38 +08:00
feat(web): Add markdown rendering support to pipeline chat messages with toggle (#1826)
* Initial plan * Add markdown rendering support to pipeline debug dialog messages with toggle button Co-authored-by: RockChinQ <[email protected]> * Fix code review feedback: remove conflicting styles and imports Co-authored-by: RockChinQ <[email protected]> * perf: styles * fix: websocket message broadcasting cross-contamination between person and group channels --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: RockChinQ <[email protected]> Co-authored-by: Junyan Qin <[email protected]>
This commit is contained in:
co-authored by
RockChinQ
Junyan Qin
parent
16ae8ac546
commit
b634aa48dc
@@ -149,12 +149,28 @@ export class WebSocketClient {
|
||||
break;
|
||||
|
||||
case 'response':
|
||||
// 检查 session_type 是否匹配 - 如果消息没有 session_type 或者不匹配当前session,都忽略
|
||||
if (!data.session_type || data.session_type !== this.sessionType) {
|
||||
// 忽略不匹配的 session_type 消息
|
||||
console.debug(
|
||||
`忽略不匹配的消息: 当前session=${this.sessionType}, 消息session=${data.session_type}`,
|
||||
);
|
||||
break;
|
||||
}
|
||||
if (data.data) {
|
||||
this.onMessageCallback?.(data.data);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'user_message':
|
||||
// 检查 session_type 是否匹配 - 如果消息没有 session_type 或者不匹配当前session,都忽略
|
||||
if (!data.session_type || data.session_type !== this.sessionType) {
|
||||
// 忽略不匹配的 session_type 消息
|
||||
console.debug(
|
||||
`忽略不匹配的用户消息: 当前session=${this.sessionType}, 消息session=${data.session_type}`,
|
||||
);
|
||||
break;
|
||||
}
|
||||
// 用户消息广播(包括自己发送的消息)
|
||||
if (data.data) {
|
||||
this.onMessageCallback?.(data.data);
|
||||
|
||||
Reference in New Issue
Block a user