Auto: refactor/simplify-daily-limits #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/simplify-daily-limits"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Automated PR for branch
refactor/simplify-daily-limits.Approved
Clean, well-structured refactoring that replaces a complex token-budget + translation-quota system with a simple daily output message count. The changes are consistent across constants, config, database, handlers, strings, and tests. The new
get_user_daily_output_messagesfunction correctly drives limit checks, and usage logging now tracksoutput_messagesper translation. Tests are thoroughly updated to match the new behavior, including a new test for multi-message output counting.Suggestions
DAILY_MESSAGE_LIMIT_FREEandDAILY_MESSAGE_LIMIT_PREMIUMare defined but never referenced anywhere in the codebase. They appear to be dead code left over from the refactoring. Consider removing them or wiring them up if they're intended for future use.activate_premiumstill acceptstranslation_limitand accumulates it intotranslation_remaining(line 630). Since the quota system is removed and callers now pass0, consider updating the function signature and docstring to reflect that this parameter is vestigial, or remove it entirely to avoid confusion.