When context compaction summarized part of a long run of tool calls, that summary was thrown away once the reply finished. The next message then sent the whole run again, every tool result included, and failed with the provider's context size error on every retry, so the chat stayed stuck. The summary is now kept with the reply, and the next message picks up from it instead of resending the whole run.
Fixes#32306
During a long run of tool calls, context compaction between tool calls judged the conversation's size from a rough character count and ignored the token count the provider reports after every model call. That count leaves out the model's reasoning and undercounts code and command output, so on a code-heavy run it read about half the real size, compaction never started, and the reply ended with the provider's context size error. Compaction now starts from the token count the provider reported for the last model call and only estimates the new tool results on top of it. Providers that report no token counts still get the estimate.
Fixes#32306
Fill the 463 empty strings in the ar and ar-BH locales.
Placeholders and Arabic plural forms follow the existing file conventions;
technical parameter names (top_k, max_tokens, ...) are kept as-is.
Co-authored-by: Omar Albarghouthi <ThisisOmar-here@users.noreply.github.com>
Chat search checks the whole query and each word in it separately. With a single word those are the same check, so every chat got searched twice. It is now searched once, with the same results. On PostgreSQL with 2164 chats (533 MB of chat data) a one-word search is about 40% faster:
| search | before | after |
|---|---|---|
| proxy | 6.0 s | 3.6 s |
| opnsense | 6.1 s | 3.8 s |
| no match | 5.4 s | 3.0 s |
Refs #32266