mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-19 18:40:57 -07:00
Rename invalidParams to validateToolParams (#12)
Methods should be verbs. Fixes #4.
This commit is contained in:
@@ -101,7 +101,7 @@ export class WriteFileTool extends BaseTool<
|
||||
* @param params Parameters to validate
|
||||
* @returns True if parameters are valid, false otherwise
|
||||
*/
|
||||
invalidParams(params: WriteFileToolParams): string | null {
|
||||
validateToolParams(params: WriteFileToolParams): string | null {
|
||||
if (
|
||||
this.schema.parameters &&
|
||||
!SchemaValidator.validate(
|
||||
@@ -185,7 +185,7 @@ export class WriteFileTool extends BaseTool<
|
||||
* @returns Result of the file writing operation
|
||||
*/
|
||||
async execute(params: WriteFileToolParams): Promise<WriteFileToolResult> {
|
||||
const validationError = this.invalidParams(params);
|
||||
const validationError = this.validateToolParams(params);
|
||||
if (validationError) {
|
||||
return {
|
||||
llmContent: `Error: Invalid parameters provided. Reason: ${validationError}`,
|
||||
|
||||
Reference in New Issue
Block a user