Skip to content

Commit ed8d3d9

Browse files
authored
refactor: remove unnecessary "await" (google-gemini#2574)
1 parent ecef0e9 commit ed8d3d9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/core/src/core/client.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ describe('Gemini Client (client.ts)', () => {
339339
describe('resetChat', () => {
340340
it('should create a new chat session, clearing the old history', async () => {
341341
// 1. Get the initial chat instance and add some history.
342-
const initialChat = await client.getChat();
342+
const initialChat = client.getChat();
343343
const initialHistory = await client.getHistory();
344344
await client.addHistory({
345345
role: 'user',
@@ -354,7 +354,7 @@ describe('Gemini Client (client.ts)', () => {
354354
await client.resetChat();
355355

356356
// 3. Get the new chat instance and its history.
357-
const newChat = await client.getChat();
357+
const newChat = client.getChat();
358358
const newHistory = await client.getHistory();
359359

360360
// 4. Assert that the chat instance is new and the history is reset.

packages/core/src/core/client.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export class GeminiClient {
100100

101101
async resetChat(): Promise<void> {
102102
this.chat = await this.startChat();
103-
await this.chat;
104103
}
105104

106105
private async getEnvironment(): Promise<Part[]> {

0 commit comments

Comments
 (0)