Skip to content

feat(元宝): add browser adapter and docs #693

Open
tiaot33 wants to merge 2 commits intojackwener:mainfrom
tiaot33:feat/yuanbao-web-adapters
Open

feat(元宝): add browser adapter and docs #693
tiaot33 wants to merge 2 commits intojackwener:mainfrom
tiaot33:feat/yuanbao-web-adapters

Conversation

@tiaot33
Copy link
Copy Markdown
Contributor

@tiaot33 tiaot33 commented Apr 2, 2026

Description

新增 yuanbao 浏览器适配器,支持以下命令:

  • opencli yuanbao new
  • opencli yuanbao ask <prompt>

本次改动同时补齐了适配器文档、侧边栏入口、README 命令可发现性,以及登录缺失场景下的 E2E 失败兜底测试。

实现要点:

  • 新增 yuanbao new,优先点击页面中的新建会话入口,失败时回退到首页重载
  • 新增 yuanbao ask <prompt>,支持 --timeout--search--think
  • 发送前会对齐 联网搜索深度思考 的开关状态
  • 通过转录增量和稳定轮询提取最终回复,尽量规避回显、占位文案和中间态干扰
  • 补充 turndown 转换规则,支持将表格类回复转为 Markdown
  • 将预期失败标准化为 CliError 子类:
    • 登录墙改为 AuthRequiredError
    • 发送失败改为 CommandExecutionError
    • 无响应超时改为 TimeoutError

Related issue:

N/A

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful

Documentation (if adding/modifying an adapter)

  • Added doc page under docs/adapters/ (if new adapter)
  • Updated docs/adapters/index.md table (if new adapter)
  • Updated sidebar in docs/.vitepress/config.mts (if new adapter)
  • Updated README.md / README.zh-CN.md when command discoverability changed
  • Used positional args for the command's primary subject unless a named flag is clearly better
  • Normalized expected adapter failures to CliError subclasses instead of raw Error

Screenshots / Output

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant