From 122678cc09131ee57dca2714bc94b039c371729b Mon Sep 17 00:00:00 2001 From: Seth Troisi Date: Wed, 11 Jun 2025 13:40:44 -0700 Subject: clean chat history before /resume (#949) --- packages/core/src/core/geminiChat.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'packages/core/src') diff --git a/packages/core/src/core/geminiChat.ts b/packages/core/src/core/geminiChat.ts index d15f9d1a..3bba1805 100644 --- a/packages/core/src/core/geminiChat.ts +++ b/packages/core/src/core/geminiChat.ts @@ -289,6 +289,13 @@ export class GeminiChat { return structuredClone(history); } + /** + * Clears the chat history. + */ + clearHistory(): void { + this.history = []; + } + /** * Adds a new entry to the chat history. * -- cgit v1.2.3