Skip to content

Split cli-sessions.js into one module per provider (#1447 pass O) - #1467

Merged
currentbits merged 8 commits into
mainfrom
coder/refactor-o-split-cli-sessions-js-c39059
Oct 5, 2026
Merged

currentbits merged 8 commits into
mainfrom
coder/refactor-o-split-cli-sessions-js-c39059

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Round 6, pass O of #1447. electron/cli-sessions.js imported CLI session history for every provider in one 2,566-line file of 91 flat functions. It's now split into one flat module per provider plus a shared module, with cli-sessions.js kept as the entry point. No caller changes its require.

Module Lines
cli-sessions-opencode.js 510
cli-sessions-claude.js 422
cli-sessions-kimi.js 389
cli-sessions-muse.js 353
cli-sessions-grok.js 332
cli-sessions-codex.js 244
cli-sessions-cursor.js 241
cli-sessions-shared.js (helpers used by several providers) 137

Checked

  • Same API: Object.keys(require("./electron/cli-sessions.js")) is identical on main and this branch, 42 keys.
  • No module-level mutable state: there is no let at module scope in any of the files, so there's nothing to own or share. Shared helpers live only in -shared.js, which requires none of the others.
  • Pure move, ignoring indentation: there are no non-move lines beyond requires and export lists.
  • Tests: full electron suite (CI-like env, machine at load 24) 4126/4126; npm run typecheck clean. npm run test:smoke (real Electron launch) passes A–E.

🤖 Generated with Claude Code

Willem and others added 8 commits October 5, 2026 13:33
…hared.js

Pure move for #1447 round 6; cli-sessions.js keeps the same exports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ex.js

Pure move for #1447 round 6; cli-sessions.js keeps the same exports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…aude.js

Pure move for #1447 round 6; cli-sessions.js keeps the same exports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pure move for #1447 round 6; cli-sessions.js keeps the same exports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rsor.js

Pure move for #1447 round 6; cli-sessions.js keeps the same exports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…opencode.js

Pure move for #1447 round 6; cli-sessions.js keeps the same exports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pure move for #1447 round 6; cli-sessions.js keeps the same exports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pure move for #1447 round 6; cli-sessions.js keeps the same exports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit e2e4d58 into main Oct 5, 2026
6 checks passed
@currentbits
currentbits deleted the coder/refactor-o-split-cli-sessions-js-c39059 branch October 5, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant