From 66b1b7344840d1b880c65e0d5833082a8d9f5d54 Mon Sep 17 00:00:00 2001 From: = <1936278+evalstate@users.noreply.github.com> Date: Sun, 1 Dec 2024 10:24:12 +0000 Subject: [PATCH] Render HTML5 Audio Player if Tool Result resource mimetype is audio. --- client/src/components/ToolsTab.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/client/src/components/ToolsTab.tsx b/client/src/components/ToolsTab.tsx index 7b85ccc..1645422 100644 --- a/client/src/components/ToolsTab.tsx +++ b/client/src/components/ToolsTab.tsx @@ -83,9 +83,19 @@ const ToolsTab = ({ /> )} {item.type === "resource" && ( -
-                  {JSON.stringify(item.resource, null, 2)}
-                
+ item.resource?.mimeType?.startsWith("audio/") ? ( + + ) : ( +
+                    {JSON.stringify(item.resource, null, 2)}
+                  
+ ) )} ))}