File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,19 @@ const ToolsTab = ({
83
83
/>
84
84
) }
85
85
{ item . type === "resource" && (
86
- < pre className = "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 whitespace-pre-wrap break-words p-4 rounded text-sm overflow-auto max-h-64" >
87
- { JSON . stringify ( item . resource , null , 2 ) }
88
- </ pre >
86
+ item . resource ?. mimeType ?. startsWith ( "audio/" ) ? (
87
+ < audio
88
+ controls
89
+ src = { `data:${ item . resource . mimeType } ;base64,${ item . resource . blob } ` }
90
+ className = "w-full"
91
+ >
92
+ < p > Your browser does not support audio playback</ p >
93
+ </ audio >
94
+ ) : (
95
+ < pre className = "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 whitespace-pre-wrap break-words p-4 rounded text-sm overflow-auto max-h-64" >
96
+ { JSON . stringify ( item . resource , null , 2 ) }
97
+ </ pre >
98
+ )
89
99
) }
90
100
</ div >
91
101
) ) }
You can’t perform that action at this time.
0 commit comments