File tree 1 file changed +14
-5
lines changed
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -87,11 +87,20 @@ const ToolsTab = ({
87
87
className = "max-w-full h-auto"
88
88
/>
89
89
) }
90
- { item . type === "resource" && (
91
- < 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" >
92
- { JSON . stringify ( item . resource , null , 2 ) }
93
- </ pre >
94
- ) }
90
+ { item . type === "resource" &&
91
+ ( item . resource ?. mimeType ?. startsWith ( "audio/" ) ? (
92
+ < audio
93
+ controls
94
+ src = { `data:${ item . resource . mimeType } ;base64,${ item . resource . blob } ` }
95
+ className = "w-full"
96
+ >
97
+ < p > Your browser does not support audio playback</ p >
98
+ </ audio >
99
+ ) : (
100
+ < 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" >
101
+ { JSON . stringify ( item . resource , null , 2 ) }
102
+ </ pre >
103
+ ) ) }
95
104
</ div >
96
105
) ) }
97
106
</ >
You can’t perform that action at this time.
0 commit comments