# How Chat Summaries works ## Summarize flow **Summarize** (⋮ → Plugins → Summarize, or hold the unread button) runs in this order: 1. A bulletin confirms the press, then the history is fetched. 2. The transcript streams to the configured OpenAI-compatible endpoint. 3. Only when the first chunk arrives is a summary card injected, directly after the newest analyzed message. If that message is not loaded (an offset, or history scrolled away), the chat is asked to load it first. The chat then jumps to the card once. 4. Reasoning and answer stream into the card. The finished summary ends with a native `#aisummaries` hashtag and is saved to a local SQLite store, from which it is restored whenever the chat is reopened. Any failure before step 3 (fetch error, empty history, unreachable host, bad key, HTTP error) is reported as a bulletin only: the chat is not modified and the view does not move. A failure mid-stream is written onto the card, and a summary saved earlier for the same range is kept. Deleting a card like any other message removes its saved row. The settings page shows how many summaries are saved and roughly how much space they take, and offers **Clear all summaries** (with a confirmation step). Summaries exist only on this device, so Telegram's own search, which runs on the server, does not find them, including a search for `#aisummaries`.