summaryrefslogtreecommitdiff
path: root/packages/core/src
diff options
context:
space:
mode:
authorSeth Troisi <[email protected]>2025-06-11 13:40:44 -0700
committerGitHub <[email protected]>2025-06-11 13:40:44 -0700
commit122678cc09131ee57dca2714bc94b039c371729b (patch)
tree59f938b9566c9b164994d16cb92163d7268f143e /packages/core/src
parent7a72d255d8effec1396170306cc6be57f598a6d8 (diff)
clean chat history before /resume (#949)
Diffstat (limited to 'packages/core/src')
-rw-r--r--packages/core/src/core/geminiChat.ts7
1 files changed, 7 insertions, 0 deletions
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
@@ -290,6 +290,13 @@ export class GeminiChat {
}
/**
+ * Clears the chat history.
+ */
+ clearHistory(): void {
+ this.history = [];
+ }
+
+ /**
* Adds a new entry to the chat history.
*
* @param content - The content to add to the history.