Remove qwen-code dependency and fix critical bugs
The plugin never needed qwen-code installed — it already has its own OAuth Device Flow (RFC 8628). This release removes the unnecessary fallback to qwen-code credentials, fixes critical bugs, and cleans up dead code.
Bugs fixed
- Silent
slow_downhandling:pollDeviceToken()returnednullwhen the server requested slow_down, preventing the polling interval from increasing. Now correctly throwsSlowDownError - Non-portable
Bun.sleep: Doesn't work on Node.js. Replaced with standardsetTimeout refreshToken || '': Treated empty string as falsy. Fixed to use??- Incorrect REAUTH_HINT: Referenced non-existent
qwen-code auth login
Dead code removed
- Fallback to
~/.qwen/oauth_creds.jsonfrom qwen-code - Functions:
loadCredentials,getValidCredentials,getOpenCodeAuthPath,generateState,checkExistingCredentials - Unused types:
QwenOAuthState,QwenModelId,ChatMessage,ChatCompletionRequest,ChatCompletionResponse,StreamChunk - Files:
src/plugin/utils.ts,src/plugin/client.ts - Dependency:
open(not imported by any active code)
Result
- -492 lines, +33 lines
- Zero runtime dependencies
- Compatible with Node.js >=20 and Bun
Closes #5