File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 1
- import { FileText , PlayCircle , ChevronRight , AlertCircle } from "lucide-react" ;
1
+ import {
2
+ FileText ,
3
+ PlayCircle ,
4
+ ChevronRight ,
5
+ AlertCircle ,
6
+ RefreshCw ,
7
+ } from "lucide-react" ;
2
8
import { Button } from "@/components/ui/button" ;
3
9
import { Alert , AlertDescription , AlertTitle } from "@/components/ui/alert" ;
4
10
import { TabsContent } from "@/components/ui/tabs" ;
@@ -58,10 +64,20 @@ const ResourcesTab = ({
58
64
</ div >
59
65
60
66
< div className = "bg-white rounded-lg shadow" >
61
- < div className = "p-4 border-b border-gray-200" >
67
+ < div className = "p-4 border-b border-gray-200 flex justify-between items-center " >
62
68
< h3 className = "font-semibold" >
63
69
{ selectedResource ? selectedResource . uri : "Select a resource" }
64
70
</ h3 >
71
+ { selectedResource && (
72
+ < Button
73
+ variant = "outline"
74
+ size = "sm"
75
+ onClick = { ( ) => readResource ( selectedResource . uri ) }
76
+ >
77
+ < RefreshCw className = "w-4 h-4 mr-2" />
78
+ Refresh
79
+ </ Button >
80
+ ) }
65
81
</ div >
66
82
< div className = "p-4" >
67
83
{ error ? (
@@ -71,7 +87,7 @@ const ResourcesTab = ({
71
87
< AlertDescription > { error } </ AlertDescription >
72
88
</ Alert >
73
89
) : selectedResource ? (
74
- < pre className = "bg-gray-50 p-4 rounded text-sm overflow-auto max-h-96" >
90
+ < pre className = "bg-gray-50 p-4 rounded text-sm overflow-auto max-h-96 whitespace-pre-wrap break-words " >
75
91
{ resourceContent }
76
92
</ pre >
77
93
) : (
You can’t perform that action at this time.
0 commit comments