Skip to content

fix(doubao): update message selectors for DOM restructure#1190

Merged
jackwener merged 1 commit intojackwener:mainfrom
wjjsn:fix/doubao-message-selectors
Apr 27, 2026
Merged

fix(doubao): update message selectors for DOM restructure#1190
jackwener merged 1 commit intojackwener:mainfrom
wjjsn:fix/doubao-message-selectors

Conversation

@wjjsn
Copy link
Copy Markdown
Contributor

@wjjsn wjjsn commented Apr 26, 2026

Summary

Update Doubao adapter message reading selectors to match current DOM structure.

Problem

getDoubaoVisibleTurns used [data-testid="message-list"] and [data-testid="receive_message"] selectors which no longer exist in Doubao's DOM. This caused the adapter to fall back to getDoubaoTranscriptLines which scraped the entire page including sidebar UI noise.

Fix

  • Message list container: [class*="message-list-S2Fv2S"], .container-PvPoAn
  • User messages: [class*="bg-g-send-msg-bubble"]
  • Assistant messages: [class*="bg-g-receive-msg-bubble"]
  • Role detection now uses bubble class names
  • Added 请仔细甄别 and 下载电脑版 to stopLines

Verification

Tested with opencli doubao ask "你好!" → returns correct response.

Fixes #1183
Related: #1189

- Replace broken data-testid selectors with class-based selectors
- Message list: [class*="message-list-S2Fv2S"], .container-PvPoAn
- User messages: [class*="bg-g-send-msg-bubble"]
- Assistant messages: [class*="bg-g-receive-msg-bubble"]
- Add stopLines for UI noise: 请仔细甄别, 下载电脑版

Fixes jackwener#1183
@jackwener jackwener force-pushed the fix/doubao-message-selectors branch from e0bb0b3 to 1e9dded Compare April 27, 2026 07:18
@jackwener jackwener merged commit e2b5952 into jackwener:main Apr 27, 2026
11 checks passed
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.

[Bug]: doubao ask cannot be use

2 participants