@@ -74,22 +74,52 @@ const ChevronDownSmall = () => (
7474) ;
7575
7676export const ClockIcon = ( ) => (
77- < svg xmlns = "http://www.w3.org/2000/svg" width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" >
77+ < svg
78+ xmlns = "http://www.w3.org/2000/svg"
79+ width = "14"
80+ height = "14"
81+ viewBox = "0 0 24 24"
82+ fill = "none"
83+ stroke = "currentColor"
84+ stroke-width = "2"
85+ stroke-linecap = "round"
86+ stroke-linejoin = "round"
87+ >
7888 < circle cx = "12" cy = "12" r = "10" />
7989 < polyline points = "12 6 12 12 16 14" />
8090 </ svg >
8191) ;
8292
8393export const CoinIcon = ( ) => (
84- < svg xmlns = "http://www.w3.org/2000/svg" width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" >
94+ < svg
95+ xmlns = "http://www.w3.org/2000/svg"
96+ width = "14"
97+ height = "14"
98+ viewBox = "0 0 24 24"
99+ fill = "none"
100+ stroke = "currentColor"
101+ stroke-width = "2"
102+ stroke-linecap = "round"
103+ stroke-linejoin = "round"
104+ >
85105 < circle cx = "12" cy = "12" r = "9" />
86106 < path d = "M14.8 9A2 2 0 0 0 13 8h-2a2 2 0 1 0 0 4h2a2 2 0 1 1 0 4h-2a2 2 0 0 1-1.8-1" />
87107 < path d = "M12 6v2m0 8v2" />
88108 </ svg >
89109) ;
90110
91111export const TokenIcon = ( ) => (
92- < svg xmlns = "http://www.w3.org/2000/svg" width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" >
112+ < svg
113+ xmlns = "http://www.w3.org/2000/svg"
114+ width = "14"
115+ height = "14"
116+ viewBox = "0 0 24 24"
117+ fill = "none"
118+ stroke = "currentColor"
119+ stroke-width = "2"
120+ stroke-linecap = "round"
121+ stroke-linejoin = "round"
122+ >
93123 < path d = "M5 5l14 14" />
94124 < path d = "M19 5l-14 14" />
95125 < path d = "M3 12h18" />
@@ -98,14 +128,34 @@ export const TokenIcon = () => (
98128) ;
99129
100130const ToolIcon = ( ) => (
101- < svg xmlns = "http://www.w3.org/2000/svg" width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" >
131+ < svg
132+ xmlns = "http://www.w3.org/2000/svg"
133+ width = "14"
134+ height = "14"
135+ viewBox = "0 0 24 24"
136+ fill = "none"
137+ stroke = "currentColor"
138+ stroke-width = "2"
139+ stroke-linecap = "round"
140+ stroke-linejoin = "round"
141+ >
102142 < path d = "M3 21h4l13 -13a1.5 1.5 0 0 0 -4 -4l-13 13v4" />
103143 < path d = "M14.5 5.5l4 4" />
104144 </ svg >
105145) ;
106146
107147const DownloadIcon = ( ) => (
108- < svg xmlns = "http://www.w3.org/2000/svg" width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" >
148+ < svg
149+ xmlns = "http://www.w3.org/2000/svg"
150+ width = "14"
151+ height = "14"
152+ viewBox = "0 0 24 24"
153+ fill = "none"
154+ stroke = "currentColor"
155+ stroke-width = "2"
156+ stroke-linecap = "round"
157+ stroke-linejoin = "round"
158+ >
109159 < path d = "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
110160 < polyline points = "7 10 12 15 17 10" />
111161 < line x1 = "12" y1 = "15" x2 = "12" y2 = "3" />
@@ -115,7 +165,17 @@ const DownloadIcon = () => (
115165// --- Node icon ---
116166
117167const DefaultNodeIcon = ( props : { size : number } ) => (
118- < svg xmlns = "http://www.w3.org/2000/svg" width = { props . size } height = { props . size } viewBox = "0 0 24 24" fill = "none" stroke = "white" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" >
168+ < svg
169+ xmlns = "http://www.w3.org/2000/svg"
170+ width = { props . size }
171+ height = { props . size }
172+ viewBox = "0 0 24 24"
173+ fill = "none"
174+ stroke = "white"
175+ stroke-width = "2"
176+ stroke-linecap = "round"
177+ stroke-linejoin = "round"
178+ >
119179 < circle cx = "12" cy = "12" r = "10" />
120180 < path d = "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" />
121181 < line x1 = "12" y1 = "17" x2 = "12.01" y2 = "17" />
@@ -351,7 +411,11 @@ const ArtifactBlock = (props: { artifact: any; index: number; apiHost?: string;
351411 const src = resolveFileUrl ( data , props . apiHost , props . chatflowid , props . chatId ) ;
352412 return (
353413 < div style = { { ...artifactBoxStyle , display : 'flex' , 'justify-content' : 'center' } } >
354- < img src = { src } alt = { `artifact-${ props . index } ` } style = { { 'max-height' : '400px' , 'max-width' : '100%' , 'object-fit' : 'contain' , display : 'block' } } />
414+ < img
415+ src = { src }
416+ alt = { `artifact-${ props . index } ` }
417+ style = { { 'max-height' : '400px' , 'max-width' : '100%' , 'object-fit' : 'contain' , display : 'block' } }
418+ />
355419 </ div >
356420 ) ;
357421 }
@@ -622,7 +686,11 @@ export const NodeDetailsContent = (props: NodeDetailsContentProps) => {
622686 background : 'rgba(0,0,0,0.02)' ,
623687 } }
624688 >
625- < img src = { src } alt = { `file-upload-${ idx ( ) } ` } style = { { 'max-height' : '400px' , 'max-width' : '100%' , 'object-fit' : 'contain' , display : 'block' } } />
689+ < img
690+ src = { src }
691+ alt = { `file-upload-${ idx ( ) } ` }
692+ style = { { 'max-height' : '400px' , 'max-width' : '100%' , 'object-fit' : 'contain' , display : 'block' } }
693+ />
626694 </ div >
627695 ) ;
628696 } }
@@ -778,7 +846,12 @@ export const NodeDetailsContent = (props: NodeDetailsContentProps) => {
778846 } }
779847 onClick = { ( ) => setToolDetailData ( tool ) }
780848 >
781- < NodeIcon name = { getToolIconName ( tool . tool , data . output ?. availableTools ) } apiHost = { props . apiHost } size = { 16 } borderRadius = "4px" /> { ' ' }
849+ < NodeIcon
850+ name = { getToolIconName ( tool . tool , data . output ?. availableTools ) }
851+ apiHost = { props . apiHost }
852+ size = { 16 }
853+ borderRadius = "4px"
854+ /> { ' ' }
782855 { tool . tool }
783856 </ span >
784857 </ Show >
@@ -876,17 +949,56 @@ export const NodeDetailsContent = (props: NodeDetailsContentProps) => {
876949 { ( m ) => (
877950 < >
878951 < Show when = { m ( ) . time } >
879- < span style = { { display : 'inline-flex' , 'align-items' : 'center' , gap : '4px' , padding : '4px 12px' , 'border-radius' : '14px' , 'font-size' : '0.75rem' , 'font-weight' : '600' , 'white-space' : 'nowrap' , background : '#4caf50' , color : '#fff' } } >
952+ < span
953+ style = { {
954+ display : 'inline-flex' ,
955+ 'align-items' : 'center' ,
956+ gap : '4px' ,
957+ padding : '4px 12px' ,
958+ 'border-radius' : '14px' ,
959+ 'font-size' : '0.75rem' ,
960+ 'font-weight' : '600' ,
961+ 'white-space' : 'nowrap' ,
962+ background : '#4caf50' ,
963+ color : '#fff' ,
964+ } }
965+ >
880966 < ClockIcon /> { m ( ) . time }
881967 </ span >
882968 </ Show >
883969 < Show when = { m ( ) . tokens } >
884- < span style = { { display : 'inline-flex' , 'align-items' : 'center' , gap : '4px' , padding : '4px 12px' , 'border-radius' : '14px' , 'font-size' : '0.75rem' , 'font-weight' : '600' , 'white-space' : 'nowrap' , background : '#7c4dff' , color : '#fff' } } >
970+ < span
971+ style = { {
972+ display : 'inline-flex' ,
973+ 'align-items' : 'center' ,
974+ gap : '4px' ,
975+ padding : '4px 12px' ,
976+ 'border-radius' : '14px' ,
977+ 'font-size' : '0.75rem' ,
978+ 'font-weight' : '600' ,
979+ 'white-space' : 'nowrap' ,
980+ background : '#7c4dff' ,
981+ color : '#fff' ,
982+ } }
983+ >
885984 < TokenIcon /> { m ( ) . tokens }
886985 </ span >
887986 </ Show >
888987 < Show when = { m ( ) . cost } >
889- < span style = { { display : 'inline-flex' , 'align-items' : 'center' , gap : '4px' , padding : '4px 12px' , 'border-radius' : '14px' , 'font-size' : '0.75rem' , 'font-weight' : '600' , 'white-space' : 'nowrap' , background : '#ff9800' , color : '#fff' } } >
988+ < span
989+ style = { {
990+ display : 'inline-flex' ,
991+ 'align-items' : 'center' ,
992+ gap : '4px' ,
993+ padding : '4px 12px' ,
994+ 'border-radius' : '14px' ,
995+ 'font-size' : '0.75rem' ,
996+ 'font-weight' : '600' ,
997+ 'white-space' : 'nowrap' ,
998+ background : '#ff9800' ,
999+ color : '#fff' ,
1000+ } }
1001+ >
8901002 < CoinIcon /> { m ( ) . cost }
8911003 </ span >
8921004 </ Show >
@@ -968,18 +1080,52 @@ export const NodeDetailsContent = (props: NodeDetailsContentProps) => {
9681080 } }
9691081 onClick = { ( e ) => e . stopPropagation ( ) }
9701082 >
971- < div style = { { display : 'flex' , 'align-items' : 'center' , 'justify-content' : 'space-between' , padding : '14px 20px' , 'border-bottom' : '1px solid rgba(0,0,0,0.1)' } } >
1083+ < div
1084+ style = { {
1085+ display : 'flex' ,
1086+ 'align-items' : 'center' ,
1087+ 'justify-content' : 'space-between' ,
1088+ padding : '14px 20px' ,
1089+ 'border-bottom' : '1px solid rgba(0,0,0,0.1)' ,
1090+ } }
1091+ >
9721092 < div style = { { display : 'flex' , 'align-items' : 'center' , gap : '8px' } } >
973- < NodeIcon name = { getToolIconName ( toolDetailData ( ) ?. tool || '' , cleanedData ( ) ?. output ?. availableTools ) } apiHost = { props . apiHost } size = { 24 } />
1093+ < NodeIcon
1094+ name = { getToolIconName ( toolDetailData ( ) ?. tool || '' , cleanedData ( ) ?. output ?. availableTools ) }
1095+ apiHost = { props . apiHost }
1096+ size = { 24 }
1097+ />
9741098 < span style = { { 'font-weight' : '600' , 'font-size' : '0.95rem' } } > { toolDetailData ( ) ?. tool || 'Tool Detail' } </ span >
9751099 < Show when = { toolDetailData ( ) ?. error } >
976- < span style = { { display : 'inline-flex' , 'align-items' : 'center' , padding : '2px 8px' , 'border-radius' : '10px' , 'font-size' : '0.7rem' , 'font-weight' : '500' , background : '#FFEBEE' , color : '#C62828' , border : '1px solid #C6282833' } } >
1100+ < span
1101+ style = { {
1102+ display : 'inline-flex' ,
1103+ 'align-items' : 'center' ,
1104+ padding : '2px 8px' ,
1105+ 'border-radius' : '10px' ,
1106+ 'font-size' : '0.7rem' ,
1107+ 'font-weight' : '500' ,
1108+ background : '#FFEBEE' ,
1109+ color : '#C62828' ,
1110+ border : '1px solid #C6282833' ,
1111+ } }
1112+ >
9771113 Error
9781114 </ span >
9791115 </ Show >
9801116 </ div >
9811117 < button
982- style = { { border : 'none' , background : 'transparent' , cursor : 'pointer' , padding : '4px' , 'border-radius' : '4px' , display : 'flex' , 'align-items' : 'center' , color : 'inherit' , opacity : '0.7' } }
1118+ style = { {
1119+ border : 'none' ,
1120+ background : 'transparent' ,
1121+ cursor : 'pointer' ,
1122+ padding : '4px' ,
1123+ 'border-radius' : '4px' ,
1124+ display : 'flex' ,
1125+ 'align-items' : 'center' ,
1126+ color : 'inherit' ,
1127+ opacity : '0.7' ,
1128+ } }
9831129 onClick = { ( ) => setToolDetailData ( null ) }
9841130 title = "Close"
9851131 >
@@ -993,7 +1139,10 @@ export const NodeDetailsContent = (props: NodeDetailsContentProps) => {
9931139 </ div >
9941140 < div
9951141 style = { { position : 'fixed' , inset : '0' , 'z-index' : 1003 , 'background-color' : 'rgba(0,0,0,0.35)' } }
996- onClick = { ( e ) => { e . stopPropagation ( ) ; setToolDetailData ( null ) ; } }
1142+ onClick = { ( e ) => {
1143+ e . stopPropagation ( ) ;
1144+ setToolDetailData ( null ) ;
1145+ } }
9971146 />
9981147 </ Show >
9991148 </ >
0 commit comments