fix: add parameter validation to all tools to prevent undefined insertions (#14)
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
* Exits plan mode by presenting the plan to the user for approval
|
||||
*/
|
||||
|
||||
import { validateRequiredParams } from "./validation.js";
|
||||
|
||||
interface ExitPlanModeArgs {
|
||||
plan: string;
|
||||
}
|
||||
@@ -10,6 +12,7 @@ interface ExitPlanModeArgs {
|
||||
export async function exit_plan_mode(
|
||||
args: ExitPlanModeArgs,
|
||||
): Promise<{ message: string }> {
|
||||
validateRequiredParams(args, ["plan"], "ExitPlanMode");
|
||||
const { plan: _plan } = args;
|
||||
|
||||
// Return confirmation message that plan was approved
|
||||
|
||||
Reference in New Issue
Block a user