refactor: remove unnecessary "await" (#2574)

This commit is contained in:
Noritaka Kobayashi 2025-06-30 04:15:27 +09:00 committed by GitHub
parent 9ae2595bfd
commit 19a0276142
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -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.

View File

@ -100,7 +100,6 @@ export class GeminiClient {
async resetChat(): Promise<void> {
this.chat = await this.startChat();
await this.chat;
}
private async getEnvironment(): Promise<Part[]> {