binary() looked only for /Applications/Doubao.app (豆包,
com.bot.pc.doubao). The reporter has only 豆包工作 at
/Applications/DoubaoWork.app/Contents/MacOS/DoubaoWork
(com.work.pc.doubao), so sign-in always said the app was missing.
choose() now picks { app, binary, dataDir } from both apps, 豆包工作
first, in /Applications and ~/Applications on macOS and under
%LOCALAPPDATA% on Windows. A user already signed in to 豆包 through
the plugin (its profile exists) stays on 豆包 while it is installed, so
the update signs no one out. 豆包工作 keeps its profile, port and model
list in a doubaowork/ subfolder. DOUBAO_WORK_APP still names the binary.
The chat page check (owns, connect) accepts doubaowork://doubaowork-chat/chat
and chrome://doubaowork-chat/chat as well as 豆包's. The busy and
not-installed messages name the chosen app and its download page.
Run (mote, worktree at 6cb5dbe8 + this change; origin/main 1bdc4d4b only
adds an autoclaw change):
- bun test packages/doubao-work: 36 pass, 0 fail.
- bun scripts/check.mjs: exit 0, doubao-work ok.
- Live on this Mac with DoubaoWork 2.36.3 (copied out of the official
dmg) and a sandbox DOUBAO_WORK_HOME: choose picked 豆包工作, App.start
launched it, owns accepted it, the page reported
chrome://doubaowork-chat/chat, input present, signed out; the model
menu read 自动 / 豆包 2.1 Lite / 豆包 2.1 Pro; the new-task and 云电脑
steps ran on the real page. A second connect reused the running app.
- 豆包 2.35.8 with a temp profile: same chat page test ids.
Broken by hand (mote): choose searching only 豆包 made "a Mac with only
豆包工作 drives 豆包工作 (#917)" red; the old owns regex made "both apps'
chat pages are the plugin's" red (34 pass, 2 fail). The old code has no
choose/isChat and binary() returns Doubao.app, so the #917 test is red
on it.
Not tried: a signed-in request (no 豆包工作 account here). Windows: the
path %LOCALAPPDATA%\DoubaoWork\Application\app\DoubaoWork.exe comes from
DoubaoWork_installer_2.36.3.exe's config (install_dir_name DoubaoWork,
exe_file_name DoubaoWork.exe) and 豆包's layout; not installed on the
Windows box. Running 豆包工作 and 豆包 side by side.
Reported-by: sinoyster