Roo-Code/src
google-labs-jules[bot] dbf1c83e33 Fix: Preserve chat history on task cancellation
Previously, canceling a running task could lead to the loss of the most recent chat history if it hadn't been saved immediately prior to cancellation.

This commit addresses the issue by ensuring that both the Cline messages (user-facing chat) and the API conversation history are explicitly saved at the beginning of the `abortTask` method in `src/core/task/Task.ts`. This guarantees that the latest state of the conversation is persisted before the task is fully terminated and its resources are released.

An automated E2E test has been added to `e2e/src/suite/task.test.ts` to specifically verify this fix. The test simulates starting a task, sending messages, canceling the task, and then resuming it to assert that the chat history remains intact.

Manual testing also confirmed that the chat history is correctly preserved after canceling and resuming a task.
2025-05-21 03:39:27 +00:00
..
__mocks__ Fall back to execa if VSCode terminal integration fails (#3049) 2025-04-29 21:10:41 -07:00
__tests__ Use yaml as default custom modes format (#3749) 2025-05-20 16:44:29 -04:00
activate Get package publisher and name from package.json + command type safety (#3766) 2025-05-20 16:41:03 -07:00
api Lm studio and ollama usage fix (#3707) 2025-05-20 20:32:43 -04:00
core Fix: Preserve chat history on task cancellation 2025-05-21 03:39:27 +00:00
exports Get package publisher and name from package.json + command type safety (#3766) 2025-05-20 16:41:03 -07:00
i18n Move error message for settings import failure into the correct position (#3752) 2025-05-20 08:50:21 -07:00
integrations Another grey screen fix. (#3644) 2025-05-20 22:27:46 -04:00
schemas Get package publisher and name from package.json + command type safety (#3766) 2025-05-20 16:41:03 -07:00
services refactor: import multiple times (#3745) 2025-05-20 09:19:44 -04:00
shared Add Gemini Flash 2.5 05-20 variants for the Vertex provider (#3758) 2025-05-20 21:13:21 -04:00
utils Get package publisher and name from package.json + command type safety (#3766) 2025-05-20 16:41:03 -07:00
workers Count tokens worker (#3037) 2025-04-29 12:29:25 -07:00
extension.ts Get package publisher and name from package.json + command type safety (#3766) 2025-05-20 16:41:03 -07:00