Add Droid CLI provider#173
Conversation
e462eaf to
10b7f00
Compare
iamtoruk
left a comment
There was a problem hiding this comment.
Good start, a few things to fix before merge:
Must fix:
-
Merge conflict --
index.tsandprovider-registry.test.tsare based on oldcoreProviderslist. Rebase on latest main which now includesopenclaw,kiloCode,rooCode. -
Dead code --
sanitizeCwd()(line 78) is defined but never called. Remove it. -
Empty if block -- lines 190-192 in the tool_result handler:
if (toolResults.length > 0 && pendingTools.length > 0) { // Tools were already collected with the assistant message }
This does nothing. Either remove the block or delete the entire tool_result check since the tools are already captured from assistant messages.
-
Double file read in discovery --
discoverSessionsInDircallsreadSessionFile(filePath)just to check if the first line issession_start. ThencreateParserreads the entire file again. For large session directories this doubles I/O. Read just the first line in discovery instead of the whole file (e.g.readFile+.split('\n', 1)[0]), or cache the content. -
No provider tests -- Only the registry test is updated. Need a
tests/providers/droid.test.tswith synthetic fixtures covering: basic parsing, token distribution, dedup, model name stripping, tool extraction, bash command extraction, missing settings file, internal session skipping, empty sessions. Seetests/providers/openclaw.test.tsortests/providers/roo-code.test.tsfor the pattern. -
Missing menubar integration -- Need
ProviderFilter.droidcase inAppStore.swiftwithproviderKeysandcliArg, plus a tab color inAgentTabStrip.swift. Check how openclaw/rooCode/kiloCode were added in the latest main.
ec88dca to
e687c72
Compare
|
Addressed the review feedback:
Verified:
|
|
All 6 items from the first review are addressed, code looks clean. One thing before merge: Needs rebase on latest main -- we just merged Qwen provider + LiteLLM snapshot pricing ( |
Discovers and parses sessions from ~/.factory/sessions/, reading JSONL message logs and companion settings.json files for token usage tracking. - Discovers sessions by scanning per-cwd subdirectories - Skips internal .factory housekeeping sessions - Extracts tools, bash commands, and user messages from JSONL - Distributes session-level cumulative token counts across calls - Normalizes Droid model wrappers before existing pricing lookup - Derives clean project names from cwd paths - Adds menubar provider filtering for Droid
e687c72 to
26ebe75
Compare
|
Rebased on latest main after the Qwen provider and menubar perf changes. Resolved provider list conflicts to include both Droid and Qwen. Verified again:
|
|
Merged, thanks for the clean rebase! If you get a chance, could you share a screenshot of the CLI or menubar showing Droid usage? Would love to promote CodeBurn in the Droid community. |





Adds support for Factory Droid CLI sessions.
What it does:
~/.factory/sessions/(JSONL + companion settings JSON).factoryhousekeeping sessionscustom:GLM-5.1-[Proxy]-0→GLM-5.1) before using CodeBurn's existing pricing lookup and user-configured model aliases~/projects/my-app→my-app)Files changed:
src/providers/droid.ts(new) — full provider implementationsrc/providers/index.ts— registers Droid as a core providertests/providers/droid.test.ts— provider fixture teststests/provider-registry.test.ts— updated expected provider listmac/Sources/CodeBurnMenubar/AppStore.swift— adds Droid provider filter/CLI argmac/Sources/CodeBurnMenubar/Views/AgentTabStrip.swift— adds Droid tab color