From a87bd17f51e1f19635fd0b1a9be514a4b2032203 Mon Sep 17 00:00:00 2001 From: = <1936278+evalstate@users.noreply.github.com> Date: Tue, 28 Jan 2025 08:28:25 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9D=AF=20npx=20prettier=20--check=20.=20Chec?= =?UTF-8?q?king=20formatting...=20[warn]=20client/src/components/ToolsTab.?= =?UTF-8?q?tsx=20[warn]=20Code=20style=20issues=20found=20in=20the=20above?= =?UTF-8?q?=20file.=20Run=20Prettier=20with=20--write=20to=20fix.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit inspector on  feature/audio-rendering [$⇡] is 📦 v0.3.0 via  v22.11.0 ❯ npx prettier --write client/src/components/ToolsTab.tsx client/src/components/ToolsTab.tsx 109ms --- client/src/components/ToolsTab.tsx | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/client/src/components/ToolsTab.tsx b/client/src/components/ToolsTab.tsx index d8a2755..33df3e5 100644 --- a/client/src/components/ToolsTab.tsx +++ b/client/src/components/ToolsTab.tsx @@ -20,11 +20,13 @@ import { CompatibilityCallToolResult } from "@modelcontextprotocol/sdk/types.js" import { z } from "zod"; // Define the AudioContent schema -export const AudioContentSchema = z.object({ - type: z.literal("audio"), - data: z.string().base64(), - mimeType: z.string(), -}).passthrough(); +export const AudioContentSchema = z + .object({ + type: z.literal("audio"), + data: z.string().base64(), + mimeType: z.string(), + }) + .passthrough(); // Extend the CallToolResult schema to include audio content export const ExtendedCallToolResultSchema = ResultSchema.extend({ @@ -34,14 +36,16 @@ export const ExtendedCallToolResultSchema = ResultSchema.extend({ ImageContentSchema, AudioContentSchema, EmbeddedResourceSchema, - ]) + ]), ), isError: z.boolean().default(false).optional(), }); // Export the types export type AudioContent = z.infer; -export type ExtendedCallToolResult = z.infer; +export type ExtendedCallToolResult = z.infer< + typeof ExtendedCallToolResultSchema +>; const ToolsTab = ({ tools, @@ -116,16 +120,16 @@ const ToolsTab = ({ /> )} {item.type === "audio" && ( - + )} - {item.type === "resource" && ( - item.resource?.mimeType?.startsWith("audio/") ? ( + {item.type === "resource" && + (item.resource?.mimeType?.startsWith("audio/") ? (