iachat/spec/lib
Petterson b7b6e67df7
fix(captain): localize AI summary to account language (#13790)
AI-generated summaries now respect the account's language setting.
Previously, summaries were always returned in English regardless of the
user's configured language, making section headings like "Customer
Intent" and "Action Items" appear in English even for non-English
accounts.

Previous behavior:
<img width="1336" height="790" alt="image"
src="https://github.com/user-attachments/assets/5df8b78b-1218-438d-9578-a806b5cb94ac"
/>


Current Behavior: 
<img width="1253" height="372" alt="image"
src="https://github.com/user-attachments/assets/ae932c97-06da-4baf-9f77-9719bc9162e8"
/>


## What changed
- Added explicit account locale to the AI system prompt in
`Captain::SummaryService`
- Updated the summary prompt template to instruct the model to translate
section headings

## How to test
1. Configure an account with a non-English language (e.g., Portuguese)
2. Open a conversation with messages
3. Use the Copilot "Summarize" feature
4. Verify that section headings ("Customer Intent", "Conversation
Summary", etc.) appear in the account's language

---------

Co-authored-by: Aakash Bakhle <48802744+aakashb95@users.noreply.github.com>
2026-04-14 17:36:10 +05:30
..
captain fix(captain): localize AI summary to account language (#13790) 2026-04-14 17:36:10 +05:30
email_templates chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
integrations fix: log only on system api key failures (#13968) 2026-04-09 18:04:52 +05:30
redis chore: Unset Redis config after spec (#8685) 2024-01-10 15:32:48 -08:00
webhooks fix(agent-bot): stabilize webhook delivery for transient upstream failures (#13521) 2026-03-02 14:18:29 +04:00
base_markdown_renderer_spec.rb feat: support image height in markdown rendering of messages (#8177) 2023-11-02 13:51:54 -07:00
chatwoot_captcha_spec.rb chore: Update dependencies to the latest versions (#5033) 2022-07-15 09:51:59 +07:00
chatwoot_exception_tracker_spec.rb chore: Load only required APMs (#6497) 2023-03-01 14:31:51 +05:30
chatwoot_hub_spec.rb chore(hub): clean up legacy Captain hub flow (#13640) 2026-02-24 20:29:53 -08:00
chatwoot_markdown_renderer_spec.rb fix: Email Channel links are not working (backend) (#13898) 2026-03-26 21:44:57 -07:00
config_loader_spec.rb Feature: Installation global config (#839) (#840) 2020-05-10 22:40:36 +05:30
custom_markdown_renderer_spec.rb feat: add GuideJar embed support in HC (#13944) 2026-03-30 14:19:02 +05:30
dyte_spec.rb feat: Upgrade Dyte apis to v2 (#10706) 2025-02-19 14:47:48 -08:00
global_config_service_spec.rb chore: Update dependencies to the latest versions (#5033) 2022-07-15 09:51:59 +07:00
global_config_spec.rb Feature: Global Config helper (#844) (#845) 2020-05-11 19:00:33 +05:30
linear_spec.rb feat(linear): Support refresh tokens and migrate legacy OAuth tokens (#13721) 2026-03-17 13:09:03 +04:00
online_status_tracker_spec.rb perf: reduce presence update frequency and fix background tab throttling (#13726) 2026-03-09 18:23:44 +05:30
safe_fetch_spec.rb fix: harden fetching on upload endpoint (#14012) 2026-04-08 10:47:54 +05:30
vapid_service_spec.rb feat: migrate facebook env vars to globalConfig (#3369) 2021-11-25 00:55:26 +05:30