feat(doubao): add --thread support for ask/send/read#828
feat(doubao): add --thread support for ask/send/read#828hanxuanliang wants to merge 1 commit intojackwener:mainfrom
Conversation
|
Left one P2 note on Other than that, this looks solid to me. The scope is tight, the command wiring is consistent across I'm reviewing this as a contributor, not a maintainer, but from that angle I think the PR is in good shape once that shared edge case is addressed. |
| const timeout = parseInt(kwargs.timeout as string, 10) || 60; | ||
|
|
||
| if (thread) { | ||
| await navigateToConversation(page, parseDoubaoConversationId(thread)); |
There was a problem hiding this comment.
If --thread is malformed or only a partial id, parseDoubaoConversationId() falls back to the raw input. That becomes risky here because navigateToConversation() treats currentUrl.includes(/chat/${conversationId}) as an exact match, so a value like 123 will match an existing /chat/1234567890123 URL and skip navigation. In that case ask can post into the wrong conversation instead of failing fast. I think this should validate the parsed id before navigation, or tighten the current URL check to compare the full path segment.
Description
Add optional
--thread <id|url>support toopencli doubao ask,send, andreadso they can target a specific existing Doubao conversation instead of relying on the currently reused browser tab.This keeps the semantics aligned with
opencli doubao detail <id>:https://www.doubao.com/chat/<id>URLAlso included:
ask,send, andread--threadexamplesRelated issue:
Type of Change
Checklist
Documentation (if adding/modifying an adapter)
docs/adapters/(if new adapter)docs/adapters/index.mdtable (if new adapter)docs/.vitepress/config.mts(if new adapter)README.md/README.zh-CN.mdwhen command discoverability changedCliErrorsubclasses instead of rawErrorScreenshots / Output
$ npx vitest run clis/doubao/*.test.ts RUN v4.1.1 /Users/hanfox/Desktop/code/self/agent/agentx/iamwho/opencli Test Files 6 passed (6) Tests 11 passed (11)