You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(cli): migrate inference-config.js to TypeScript (#1265)
## Summary
- Convert `bin/lib/inference-config.js` (143 lines) to
`src/lib/inference-config.ts`
- Typed interfaces: `ProviderSelectionConfig`, `GatewayInference`
- All 3 exports are pure — straightforward full conversion
- Co-locate tests: `test/inference-config.test.js` →
`src/lib/inference-config.test.ts`
Stacked on #1240. 614 CLI tests pass. Coverage ratchet passes.
Relates to #924 (shell consolidation).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Centralized inference configuration, provider selection, and gateway
output parsing into a single consolidated module for more consistent
behavior.
* **Tests**
* Updated tests to match the consolidated module and improved assertion
patterns.
* **Chores**
* Install/prep process now includes a CLI build step during project
setup (silently handled).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
"typecheck": "tsc -p jsconfig.json",
16
16
"build:cli": "tsc -p tsconfig.src.json",
17
17
"typecheck:cli": "tsc -p tsconfig.cli.json",
18
-
"prepare": "npm install --omit=dev --ignore-scripts 2>/dev/null || true && if [ -d .git ]; then if command -v prek >/dev/null 2>&1; then prek install; elif [ -d node_modules/@j178/prek ]; then echo \"ERROR: prek package found but binary not in PATH\" && exit 1; else echo \"Skipping git hook setup (prek not installed)\"; fi; fi",
18
+
"prepare": "npm install --omit=dev --ignore-scripts 2>/dev/null || true && if command -v tsc >/dev/null 2>&1 || [ -x node_modules/.bin/tsc ]; then npm run build:cli; fi && if [ -d .git ]; then if command -v prek >/dev/null 2>&1; then prek install; elif [ -d node_modules/@j178/prek ]; then echo \"ERROR: prek package found but binary not in PATH\" && exit 1; else echo \"Skipping git hook setup (prek not installed)\"; fi; fi",
0 commit comments