Repository navigation
fix(lint): move knownAgentIds out of the session host - #26648
Conversation
#26416 pushed structured-agent-session-host.ts one line over the 300-line limit, so main's oxlint is red and merges from main fail the commit hook. Move the pure knownAgentIds logic into structured-agent-session-provider-support.ts beside the other agent-support checks.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe provider support module now returns distinct agent IDs from registered definitions and saved session record providers. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Agent ID lookup behavior remains unchanged after the extraction; no merge-blocking concern is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ELI5
Main's lint is red again:
src/main/native-chat/agent-session-wire/structured-agent-session-host.tswent one line over the 300-line limit when #26416 added the startup-expiry and option-revision wiring. Every PR shows the failure, and merging main into a branch is blocked because the commit hook lints the incoming file. This moves one small piece of logic out of that file. Nothing changes for users.What Changed
knownAgentIds(every agent this runtime registered, plus any agent a saved chat names) is now a plain function,knownAgentIds(deps), in the existingstructured-agent-session-provider-support.ts, beside the other "which agents can this host serve" checks.Why
The host class is already split into collaborators and sits at its line budget; this is a pure function of the host's dependencies, so it belongs with the other agent-support checks rather than in the class. Raising the limit or disabling the rule isn't allowed.
Linked Issue
None. Fixes main's
max-lineslint failure introduced by #26416.Visual Proof
N/A: code move only, no behavior or UI change.
Testing
The existing restart-resume suite that exercises
knownAgentIds(7 tests) passes unchanged.oxlintandoxfmtpass on both files.orca-ci-checks(lint, code-quality and typecheck): 23/23 passed, including the typecheck.Review
Self-reviewed: a pure move with no logic edits.
Agent skill upstream boundary
Notes
No platform, SSH, mobile or compatibility impact.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)