Skip to content

Feat/webpage adapter#2135

Open
fdc310 wants to merge 6 commits intomasterfrom
feat/webpage_adapter
Open

Feat/webpage adapter#2135
fdc310 wants to merge 6 commits intomasterfrom
feat/webpage_adapter

Conversation

@fdc310
Copy link
Copy Markdown
Member

@fdc310 fdc310 commented Apr 17, 2026

概述 / Overview

请在此部分填写你实现/解决/优化的内容:
Summary of what you implemented/solved/optimized:

主要是增加了网页机器人,但是只是插入到一些网页右下角使用

更改前后对比截图 / Screenshots

请在此部分粘贴更改前后对比截图(可以是界面截图、控制台输出、对话截图等):
Please paste the screenshots of changes before and after here (can be interface screenshots, console output, conversation screenshots, etc.):

修改前 / Before:

修改后 / After:

检查清单 / Checklist

PR 作者完成 / For PR author

请在方括号间写x以打勾 / Please tick the box with x

  • 阅读仓库贡献指引了吗? / Have you read the contribution guide?
  • 与项目所有者沟通过了吗? / Have you communicated with the project maintainer?
  • 我确定已自行测试所作的更改,确保功能符合预期。 / I have tested the changes and ensured they work as expected.

项目维护者完成 / For project maintainer

  • 相关 issues 链接了吗? / Have you linked the related issues?
  • 配置项写好了吗?迁移写好了吗?生效了吗? / Have you written the configuration items? Have you written the migration? Has it taken effect?
  • 依赖加到 pyproject.toml 和 core/bootutils/deps.py 了吗 / Have you added the dependencies to pyproject.toml and core/bootutils/deps.py?
  • 文档编写了吗? / Have you written the documentation?

fdc310 added 2 commits April 17, 2026 23:35
- Implemented a new `web_page_bot` adapter for embedding chat widgets on websites.
- Created a new YAML configuration file for `web_page_bot` with necessary metadata and execution details.
- Developed the `WebPageBotAdapter` class to handle message events and manage listeners.
- Added a JavaScript widget for embedding the chat interface, including styles and functionality for user interaction.
- Updated WebSocket handling to support the new bot adapter and manage connections.
- Enhanced the bot form to include pipeline UUID and adapter configuration in the system context.
- Introduced a new dynamic form item type for embed code in the form entity.
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. eh: Feature enhance: 新功能添加 / add new features javascript Pull requests that update Javascript code m: Platform 机器人管理相关 / Bots management labels Apr 17, 2026
Comment thread src/langbot/templates/embed/widget.js Fixed
Comment thread src/langbot/templates/embed/widget.js Fixed
Comment thread src/langbot/templates/embed/widget.js Fixed
Comment thread src/langbot/templates/embed/widget.js Fixed
Comment thread src/langbot/templates/embed/widget.js Fixed
Comment thread src/langbot/templates/embed/widget.js Fixed
- Add UUID format validation for pipeline_uuid parameters
- Add Cloudflare Turnstile integration for bot protection (optional)
- Add HMAC-signed session tokens for /messages, /reset, /feedback endpoints
- Sanitize error responses (remove internal exception details)
- Sanitize base_url before JS injection
- Fix XSS in markdown link rendering (only allow http/https protocols)
- Fix XSS in image URL extraction (only allow http/https/data protocols)
- Escape widget title in embed code snippet (HTML entity encoding)
- Remove class-level mutable default in WebPageBotAdapter
- Remove duplicate config line and console.log in widget.js
- Add turnstile_site_key and turnstile_secret_key config fields
}
}

function wsDisconnect() {
return div;
}

function showTypingIndicator() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eh: Feature enhance: 新功能添加 / add new features javascript Pull requests that update Javascript code m: Platform 机器人管理相关 / Bots management size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants