Skip to content

fix(doubao): support current history and detail DOM#1375

Open
lmmsoft wants to merge 2 commits into
jackwener:mainfrom
lmmsoft:fix/doubao-history-detail-dom
Open

fix(doubao): support current history and detail DOM#1375
lmmsoft wants to merge 2 commits into
jackwener:mainfrom
lmmsoft:fix/doubao-history-detail-dom

Conversation

@lmmsoft
Copy link
Copy Markdown

@lmmsoft lmmsoft commented May 6, 2026

Summary

  • update Doubao history extraction to support the current sidebar DOM (#flow_chat_sidebar, conversation_* anchors, and /chat/<id> links)
  • update Doubao detail extraction to support current message list/item classes, user send bubbles, and assistant .flow-markdown-body content
  • add regression coverage for the new sidebar and detail selectors

Verification

  • PATH=/Users/lmm333/.nvm/versions/node/v24.13.0/bin:$PATH npm exec vitest run --project adapter clis/doubao/utils.test.js clis/doubao/history.test.js clis/doubao/detail.test.js
  • PATH=/Users/lmm333/.nvm/versions/node/v24.13.0/bin:$PATH npm run typecheck
  • manually verified on logged-in Doubao browser session that opencli doubao history --limit 5 returns real conversations and opencli doubao detail <conversation_id> returns user/assistant messages

Generated on: cmcc-i5

Generated by: home_codex
Copilot AI review requested due to automatic review settings May 6, 2026 18:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Doubao CLI adapter’s DOM-scraping scripts so history and detail can continue working with Doubao’s current sidebar and conversation detail markup.

Changes:

  • Broadened sidebar selectors in getConversationListScript() to handle current conversation anchors and dedupe results.
  • Broadened detail selectors in getConversationDetailScript() to handle current message containers/bubbles.
  • Added/extended unit tests to assert the updated selector coverage, and exported the scripts via __test__ for testing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
clis/doubao/utils.js Updates the in-page evaluation scripts for conversation list + detail extraction, and exports the new scripts for tests.
clis/doubao/utils.test.js Adds tests asserting the updated DOM selectors are present in the generated scripts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread clis/doubao/utils.js Outdated
Comment thread clis/doubao/utils.js Outdated
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.

2 participants