| 581 | // not send a new message (regenerate/swipe/continue) are armed by onGenerationStarted instead. | 584 | // not send a new message (regenerate/swipe/continue) are armed by onGenerationStarted instead. |
| 582 | eventSource.on(event_types.MESSAGE_SENT, onMessageSent); | 585 | eventSource.on(event_types.MESSAGE_SENT, onMessageSent); |
| 583 | | 586 | |
| 584 | // Activity resets the backend deadline but never arms keepalive on its own. A completed | 587 | // Only actual text-provider generations reset the cache deadline. Local chat edits still |
| 585 | // generation or a chat edit also refreshes the stored request so the server always replays | 588 | // refresh the stored request so the server replays the latest prompt without pretending that |
| 586 | // the latest prompt assembled by the UI. | 589 | // those edits refreshed the provider cache. |
| 587 | eventSource.on(event_types.MESSAGE_RECEIVED, onMessageReceived); | 590 | eventSource.on(event_types.MESSAGE_RECEIVED, onMessageReceived); |
| 588 | eventSource.on(event_types.GENERATION_STARTED, onGenerationStarted); | 591 | eventSource.on(event_types.GENERATION_STARTED, onGenerationStarted); |
| 589 | eventSource.on(event_types.GENERATION_ENDED, onGenerationEnded); | 592 | eventSource.on(event_types.GENERATION_ENDED, onGenerationEnded); |