summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoritaka Kobayashi <[email protected]>2025-06-30 04:15:27 +0900
committerGitHub <[email protected]>2025-06-29 19:15:27 +0000
commit19a0276142b61208e5d4b723e422e37bf005845a (patch)
tree416eefaea3b0f018eef9062a0d70a54b84ee6be4
parent9ae2595bfde85d24ae0330d50f97ce0a8e2dc374 (diff)
refactor: remove unnecessary "await" (#2574)
-rw-r--r--packages/core/src/core/client.test.ts4
-rw-r--r--packages/core/src/core/client.ts1
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<void> {
this.chat = await this.startChat();
- await this.chat;
}
private async getEnvironment(): Promise<Part[]> {