From 19a0276142b61208e5d4b723e422e37bf005845a Mon Sep 17 00:00:00 2001 From: Noritaka Kobayashi Date: Mon, 30 Jun 2025 04:15:27 +0900 Subject: [PATCH] refactor: remove unnecessary "await" (#2574) --- packages/core/src/core/client.test.ts | 4 ++-- packages/core/src/core/client.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) 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 {