Show usage stats when running lms chat --verbose#462
Show usage stats when running lms chat --verbose#462immerSIR wants to merge 1 commit intolmstudio-ai:mainfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb6c2df53b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| await handleNonInteractiveChat(llm, chat, providedPrompt, logger, { | ||
| stats: options.stats, | ||
| stats: options.stats || options.verbose === true, |
There was a problem hiding this comment.
Return undefined when stats flags are absent
This expression now yields false when neither --stats nor --verbose is provided, but handleNonInteractiveChat treats any value other than undefined as “show stats” (opts.stats !== undefined). In non-interactive runs (for example lms chat -p "hi"), this makes usage stats print even when the user did not request them, which is a behavior regression from the previous options.stats pass-through.
Useful? React with 👍 / 👎.
|
I have read the CLA Document and I hereby sign the CLA |
Summary
--verboseas enabling chat usage statsResult
Running
lms chat --verbosenow shows usage stats without requiring an extra--statsflag.Fixes #238