summaryrefslogtreecommitdiff
path: root/packages/server/src/core/turn.ts
diff options
context:
space:
mode:
authorTaylor Mullen <[email protected]>2025-05-26 14:17:56 -0700
committerN. Taylor Mullen <[email protected]>2025-05-26 14:20:28 -0700
commit480549e02ed4ae01c7df2abbd98bb0eb5b23bdd5 (patch)
tree9eae14b1d3e498a78b5809154189bfcc93de6274 /packages/server/src/core/turn.ts
parent02503a3248d377e13dda5cf8ad5fc39cce365811 (diff)
Refactor(chat): Introduce custom Chat class for future modifications
- Copied the `Chat` class from `@google/genai` into `packages/server/src/core/geminiChat.ts`. - This change is in preparation for future modifications to the chat handling logic. - Updated relevant files to use the new `GeminiChat` class. Part of https://github.com/google-gemini/gemini-cli/issues/551
Diffstat (limited to 'packages/server/src/core/turn.ts')
-rw-r--r--packages/server/src/core/turn.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/server/src/core/turn.ts b/packages/server/src/core/turn.ts
index a02b5eb6..d5c7eb58 100644
--- a/packages/server/src/core/turn.ts
+++ b/packages/server/src/core/turn.ts
@@ -6,7 +6,6 @@
import {
Part,
- Chat,
PartListUnion,
GenerateContentResponse,
FunctionCall,
@@ -20,6 +19,7 @@ import {
import { getResponseText } from '../utils/generateContentResponseUtilities.js';
import { reportError } from '../utils/errorReporting.js';
import { getErrorMessage } from '../utils/errors.js';
+import { GeminiChat } from './geminiChat.js';
// Define a structure for tools passed to the server
export interface ServerTool {
@@ -113,7 +113,7 @@ export class Turn {
}>;
private debugResponses: GenerateContentResponse[];
- constructor(private readonly chat: Chat) {
+ constructor(private readonly chat: GeminiChat) {
this.pendingToolCalls = [];
this.debugResponses = [];
}