File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -87,11 +87,20 @@ const ToolsTab = ({
8787 className = "max-w-full h-auto"
8888 />
8989 ) }
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+ ) ) }
95104 </ div >
96105 ) ) }
97106 </ >
You can’t perform that action at this time.
0 commit comments