More linting fixes
This commit is contained in:
@@ -1 +1,2 @@
|
||||
PORT=11434
|
||||
VERBOSE=false
|
||||
1
.prettierignore
Normal file
1
.prettierignore
Normal file
@@ -0,0 +1 @@
|
||||
*.*
|
||||
8
.vscode/settings.json
vendored
8
.vscode/settings.json
vendored
@@ -1,5 +1,11 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": [
|
||||
"source.fixAll.eslint"
|
||||
],
|
||||
"eslint.validate": ["javascript", "typescript"],
|
||||
"prettier.singleQuote": true,
|
||||
"cSpell.ignorePaths" : [
|
||||
"src"
|
||||
],
|
||||
]
|
||||
}
|
||||
@@ -7,12 +7,7 @@ import { ToolRegistry }
|
||||
from '@google/gemini-cli-core/dist/src/tools/tool-registry.js';
|
||||
import { Config } from '@google/gemini-cli-core/dist/src/config/config.js';
|
||||
import { Tool } from '@google/gemini-cli-core/dist/src/tools/tools.js';
|
||||
import {
|
||||
Part,
|
||||
RequestBody,
|
||||
GeminiResponse,
|
||||
GeminiStreamChunk,
|
||||
} from './types';
|
||||
import { Part, RequestBody, GeminiResponse, GeminiStreamChunk } from './types';
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
async function callLocalFunction(/*_name: string, _args: unknown*/) {
|
||||
@@ -80,15 +75,12 @@ export async function mapRequest(body: RequestBody) {
|
||||
name: fn.name,
|
||||
displayName: fn.name,
|
||||
description: fn.description ?? '',
|
||||
schema: z.object(
|
||||
(fn.parameters?.properties as ZodRawShape) ?? {},
|
||||
),
|
||||
schema: z.object((fn.parameters?.properties as ZodRawShape) ?? {}),
|
||||
isOutputMarkdown: false,
|
||||
canUpdateOutput: false,
|
||||
validateToolParams: () => null,
|
||||
getDescription: (params: unknown) =>
|
||||
`Executing ${fn.name} with parameters: ` +
|
||||
JSON.stringify(params),
|
||||
`Executing ${fn.name} with parameters: ` + JSON.stringify(params),
|
||||
shouldConfirmExecute: () => Promise.resolve(false),
|
||||
execute: () => callLocalFunction(),
|
||||
} as Tool);
|
||||
@@ -140,7 +132,5 @@ export function mapStreamChunk(chunk: GeminiStreamChunk) {
|
||||
} else if (typeof part.text === 'string') {
|
||||
delta.content = part.text;
|
||||
}
|
||||
return { choices: [ { delta, index: 0 } ] };
|
||||
return { choices: [{ delta, index: 0 }] };
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user