diff --git a/packages/core/src/core/client.test.ts b/packages/core/src/core/client.test.ts index 924b4097..6a2ab307 100644 --- a/packages/core/src/core/client.test.ts +++ b/packages/core/src/core/client.test.ts @@ -339,7 +339,7 @@ describe('Gemini Client (client.ts)', () => { describe('resetChat', () => { it('should create a new chat session, clearing the old history', async () => { // 1. Get the initial chat instance and add some history. - const initialChat = await client.getChat(); + const initialChat = client.getChat(); const initialHistory = await client.getHistory(); await client.addHistory({ role: 'user', @@ -354,7 +354,7 @@ describe('Gemini Client (client.ts)', () => { await client.resetChat(); // 3. Get the new chat instance and its history. - const newChat = await client.getChat(); + const newChat = client.getChat(); const newHistory = await client.getHistory(); // 4. Assert that the chat instance is new and the history is reset. diff --git a/packages/core/src/core/client.ts b/packages/core/src/core/client.ts index a0bb49fc..3030676a 100644 --- a/packages/core/src/core/client.ts +++ b/packages/core/src/core/client.ts @@ -100,7 +100,6 @@ export class GeminiClient { async resetChat(): Promise { this.chat = await this.startChat(); - await this.chat; } private async getEnvironment(): Promise {