From 6ce4a0b56343c0251866e747032733c2a8b553a0 Mon Sep 17 00:00:00 2001 From: olaservo Date: Sun, 27 Jul 2025 07:19:48 -0700 Subject: [PATCH] Fix formatting --- cli/src/client/prompts.ts | 2 +- cli/src/client/tools.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cli/src/client/prompts.ts b/cli/src/client/prompts.ts index 79bc4d29..87014617 100644 --- a/cli/src/client/prompts.ts +++ b/cli/src/client/prompts.ts @@ -34,7 +34,7 @@ export async function getPrompt( const stringArgs: Record = {}; if (args) { for (const [key, value] of Object.entries(args)) { - if (typeof value === 'string') { + if (typeof value === "string") { stringArgs[key] = value; } else if (value === null || value === undefined) { stringArgs[key] = String(value); diff --git a/cli/src/client/tools.ts b/cli/src/client/tools.ts index 6d886234..9da0b4d9 100644 --- a/cli/src/client/tools.ts +++ b/cli/src/client/tools.ts @@ -30,7 +30,10 @@ export async function listTools(client: Client): Promise { } } -function convertParameterValue(value: string, schema: JsonSchemaType): JsonValue { +function convertParameterValue( + value: string, + schema: JsonSchemaType, +): JsonValue { if (!value) { return value; } @@ -92,11 +95,11 @@ export async function callTool( // since we now accept pre-parsed values from the CLI const stringArgs: Record = {}; for (const [key, value] of Object.entries(args)) { - if (typeof value === 'string') { + if (typeof value === "string") { stringArgs[key] = value; } } - + if (Object.keys(stringArgs).length > 0) { const convertedStringArgs = convertParameters(tool, stringArgs); convertedArgs = { ...args, ...convertedStringArgs };