don't confirm invalid params in terminal tool, or in general (added comments to base class) (#187)

This commit is contained in:
Olcan
2025-04-27 10:25:12 -07:00
committed by GitHub
parent 7828e813a8
commit 9de2e82b8f
2 changed files with 7 additions and 0 deletions

View File

@@ -36,6 +36,8 @@ export interface Tool<
/**
* Validates the parameters for the tool
* Should be called from both `shouldConfirmExecute` and `execute`
* `shouldConfirmExecute` should return false immediately if invalid
* @param params Parameters to validate
* @returns An error message string if invalid, null otherwise
*/
@@ -102,6 +104,8 @@ export abstract class BaseTool<
/**
* Validates the parameters for the tool
* This is a placeholder implementation and should be overridden
* Should be called from both `shouldConfirmExecute` and `execute`
* `shouldConfirmExecute` should return false immediately if invalid
* @param params Parameters to validate
* @returns An error message string if invalid, null otherwise
*/