iachat/app
Shivam Mishra 3b366f43e6
feat: setup captain limits (#10713)
This pull request introduces several changes to implement and manage
usage limits for the Captain AI service. The key changes include adding
configuration for plan limits, updating error messages, modifying
controllers and models to handle usage limits, and updating tests to
ensure the new functionality works correctly.

## Implementation Checklist

- [x] Ability to configure captain limits per check
- [x] Update response for `usage_limits` to include captain limits
- [x] Methods to increment or reset captain responses limits in the
`limits` column for the `Account` model
- [x] Check documents limit using a count query
- [x] Ensure Captain hand-off if a limit is reached
- [x] Ensure limits are enforced for Copilot Chat
- [x] Ensure limits are reset when stripe webhook comes in 
- [x] Increment usage for FAQ generation and Contact notes
- [x] Ensure documents limit is enforced

These changes ensure that the Captain AI service operates within the defined usage limits for different subscription plans, providing appropriate error messages and handling when limits are exceeded.
2025-01-23 01:23:18 +05:30
..
actions chore: Avoid contact inboxes getting deleted (#10612) 2024-12-26 16:17:38 +05:30
assets feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
builders fix: Exclude notifications for blocked contacts, except mentions (#10659) 2025-01-12 15:30:27 +05:30
channels chore: Sentry issues (#4623) 2022-05-06 14:50:55 +05:30
controllers feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
dashboards feat: Display Account Custom Attributes in Super Admin (#10459) 2024-11-20 09:02:33 -08:00
dispatchers feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
drops feat: Add the support for custom attributes in message variables (#8511) 2023-12-08 14:13:35 -08:00
fields feat: setup captain limits (#10713) 2025-01-23 01:23:18 +05:30
finders feat: Conversation API to return applied_sla and sla_events (#9174) 2024-04-01 23:30:07 +05:30
helpers feat: validate query conditions (#10595) 2024-12-17 17:16:37 +05:30
javascript fix: country selection (#10670) 2025-01-22 21:30:51 +05:30
jobs feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
listeners fix: Use message sender ID in the analytics for first response time (#9605) 2024-06-06 20:20:35 -07:00
mailboxes chore: Disable throwing error for malformed to address (#10464) 2024-11-20 18:58:54 -08:00
mailers feat: add Google Email fetch and OAuth token refresh service (#9603) 2024-06-11 14:22:03 +05:30
models feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
policies feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
presenters fix: Email attachments created with empty filename (#10420) 2024-11-15 09:07:24 +04:00
services feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
views feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
workers fix: Capture delivery errors to avoid false positives (#8790) 2024-01-26 14:22:18 +04:00