feat: add qwen backend support#201
Conversation
NovakPAai
left a comment
There was a problem hiding this comment.
Code Review
padEnd doesn't work correctly with ANSI escape codes — in bin/cli.js, the list case does:
const tool = getToolDisplay(s.tool).ansi.padEnd(18);String.prototype.padEnd counts escape code characters as visible characters, so ANSI-colored strings like \x1b[33mqwen\x1b[0m (14 chars of escape codes + 4 visible) will pad to fewer spaces than intended. The column alignment in codbash list will be off for all tools.
Suggestion: pad the plain label string and apply ANSI coloring after padding, or calculate visible length separately.
handoff help block, this was changed:
- codbash handoff 13ae5748 codex For Codex specifically
+ codbash handoff 13ae5748 qwen For Qwen specifically
The Codex example was removed. A new agent shouldn't erase existing documentation — both examples should coexist.
STATS_TOOL_ROWS is incomplete — it lists Claude, Codex, Qwen, Cursor, OpenCode, Kiro but doesn't include Kilo or other agents already supported by the project. Newly added agents (Kimi, Droid, Copilot) are also missing. The stats output will silently omit those session counts.
vakovalskii
left a comment
There was a problem hiding this comment.
LGTM — backend follows existing Codex/Cursor patterns: parseQwenSessionFile, scanQwenSessions, loadQwenDetail with proper try/catch + version-tolerant parsing. CLI refactor to TOOL_LABELS/STATS_TOOL_ROWS makes future agent additions cleaner. Unavailable-pricing flag reuses Cursor/Kiro convention.
Adds Qwen Code as a first-class agent across backend flows.
What changed
~/.qwen/projects/*/(chats|sessions)/*.jsonlwith version-tolerant parsing and graceful handling of missing/malformed filesloadQwenDetail,parseQwenSessionFile,scanQwenSessions)MODEL_PRICINGentry)ps+lsof+ explicit--session-idmatching)convert.js)handoff.js)list,show,stats,handoff,converthelp text and resume commandsValidation
node -cpassed for all modified files~/.qwendataThis is PR 1 of 3. Frontend UI (#??? ) and terminal resume (#??? ) depend on this.