feat(chat): add --temperature flag to opencli chat#279
Conversation
`opencli run` accepted --temperature but `opencli chat` had no such flag, forcing interactive-session users to set temperature only via config file. This brings chat to parity with run. Part of #251 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Review: feat(chat): add --temperature flag to opencli chatWhat's good: This is exactly right. The change is four lines that mirror what Notes1. No new unit test for the CLI flag path The 733 existing tests continue to pass, and the change is a pure threading operation (no new logic). That said, a test that stubs 2. Interaction with #230 (o1 temperature guard) Explicitly passing 3. No conflicts with #252 The two PRs touch non-overlapping line ranges in Recommendation: Merge. The change is a clean, narrow parity feature with no risk of regression. The only open item (o1 temperature guard) is a pre-existing gap tracked under #230. Generated by Claude Code |
Summary
opencli runaccepted--temperaturebutopencli chathad no such flag, so interactive-session users had no per-invocation way to control temperature.--temperature <float>to thechatcommand and threads it throughstartChat()→createAgent(), bringingchatto parity withrun.config.temperaturefallback increateAgent()and addsopencli config --temperature). The two PRs touch non-overlapping lines and can be merged in any order.Related issue
Part of #251
Test plan
npm run typecheck && npm run lint && npm run format:check && npm test— all pass (733 tests)opencli chat --temperature 0andopencli chat --temperature 1.5are accepted;--temperature 3correctly rejects with validation erroropencli chatwith no flag continues to work unchanged (temperature isundefined,createAgent()defaults apply)Notes for reviewers
This is intentionally narrow — only the
chatcommand definition andstartChat()signature change (4 lines added). Thetemperature ?? config.temperaturefallback fix is handled separately in PR #252 to keep each PR focused and conflict-free.Generated by Claude Code