Initial auto-fixing of linting errors.

- This is the result of runing `npm lint -- -fix`
This commit is contained in:
Taylor Mullen
2025-04-18 10:53:16 -04:00
committed by N. Taylor Mullen
parent cb30351403
commit e0339993ae
20 changed files with 37 additions and 50 deletions

View File

@@ -44,7 +44,7 @@ export class GeminiClient {
this.ai = new GoogleGenAI({ apiKey });
}
public async startChat(): Promise<Chat> {
async startChat(): Promise<Chat> {
const tools = toolRegistry.getToolSchemas();
const model = getModel();
@@ -75,7 +75,7 @@ ${folderStructure}
try {
const chat = this.ai.chats.create({
model: model,
model,
config: {
systemInstruction: CoreSystemPrompt,
...this.defaultHyperParameters,
@@ -103,14 +103,12 @@ ${folderStructure}
}
}
public addMessageToHistory(chat: Chat, message: Content): void {
addMessageToHistory(chat: Chat, message: Content): void {
const history = chat.getHistory();
history.push(message);
this.ai.chats;
chat;
}
public async *sendMessageStream(
async *sendMessageStream(
chat: Chat,
request: PartListUnion,
signal?: AbortSignal,
@@ -180,7 +178,7 @@ ${folderStructure}
}
if (pendingToolCalls.length > 0) {
const toolPromises: Promise<ToolExecutionOutcome>[] =
const toolPromises: Array<Promise<ToolExecutionOutcome>> =
pendingToolCalls.map(async (pendingToolCall) => {
const tool = toolRegistry.getTool(pendingToolCall.name);
@@ -311,7 +309,7 @@ ${folderStructure}
return {
functionResponse: {
name: name,
name,
id: executedTool.callId,
response: toolOutcomePayload,
},
@@ -444,7 +442,7 @@ Respond *only* in JSON format according to the following schema. Do not include
* @returns A promise that resolves to the parsed JSON object matching the schema.
* @throws Throws an error if the API call fails or the response is not valid JSON.
*/
public async generateJson(
async generateJson(
contents: Content[],
schema: SchemaUnion,
): Promise<any> {
@@ -458,7 +456,7 @@ Respond *only* in JSON format according to the following schema. Do not include
responseSchema: schema,
responseMimeType: 'application/json',
},
contents: contents, // Pass the full Content array
contents, // Pass the full Content array
});
const responseText = result.text;