@@ -22,7 +22,6 @@ import {
2222 StickyNoteIcon ,
2323 TriangleIcon ,
2424 TypeIcon ,
25- WrenchIcon ,
2625} from "lucide-react" ;
2726// @ts -ignore - https://github.com/lucide-icons/lucide/issues/2867#issuecomment-2847105863
2827import { DynamicIcon } from "lucide-react/dynamic.mjs" ;
@@ -273,12 +272,6 @@ export const WorkflowNode = memo(
273272 setSelectedInput ( null ) ;
274273 } ;
275274
276- const handleToolIconClick = ( e : React . MouseEvent ) => {
277- e . stopPropagation ( ) ;
278- if ( readonly ) return ;
279- setIsToolSelectorOpen ( true ) ;
280- } ;
281-
282275 const handleToolSelectorClose = ( ) => {
283276 setIsToolSelectorOpen ( false ) ;
284277 } ;
@@ -327,18 +320,62 @@ export const WorkflowNode = memo(
327320 < div className = "flex items-center gap-1 flex-1 min-w-0" >
328321 < DynamicIcon
329322 name = { data . icon as any }
330- className = "mx-1 h-3 w-3 text-blue-600 shrink-0"
323+ className = "mx-1 h-3 w-3 text-blue-500 shrink-0"
331324 />
332325 < h3 className = "text-xs font-medium truncate" > { data . name } </ h3 >
333- { data . functionCalling && (
334- < WrenchIcon
335- className = "h-3 w-3 text-blue-600 shrink-0 cursor-pointer hover:text-blue-700 transition-colors"
336- onClick = { handleToolIconClick }
337- />
338- ) }
339326 </ div >
340327 </ div >
341328
329+ { /* Tools bar (between header and body) */ }
330+ { data . functionCalling && (
331+ < div
332+ className = "px-1 py-1 border-b nodrag flex flex-wrap items-start gap-1"
333+ onClick = { ( e ) => {
334+ e . stopPropagation ( ) ;
335+ if ( readonly ) return ;
336+ setIsToolSelectorOpen ( true ) ;
337+ } }
338+ >
339+ { ( ( ) => {
340+ const selectedTools = getCurrentSelectedTools ( ) ;
341+ if ( ! selectedTools . length ) {
342+ return (
343+ < span className = "text-[10px] text-neutral-500" >
344+ Click to select tools
345+ </ span >
346+ ) ;
347+ }
348+
349+ return (
350+ < div className = "flex flex-wrap items-center gap-1" >
351+ { selectedTools . map ( ( tool , idx ) => {
352+ const tpl = ( data . nodeTemplates || [ ] ) . find (
353+ ( t ) => t . id === tool . identifier
354+ ) ;
355+ return (
356+ < span
357+ key = { `${ tool . identifier } -${ idx } ` }
358+ className = "inline-flex items-center gap-1 px-1 py-[2px] rounded bg-neutral-100 text-[10px] text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300"
359+ >
360+ { tpl ?. icon ? (
361+ < DynamicIcon
362+ name = { tpl . icon as any }
363+ className = "h-3 w-3"
364+ />
365+ ) : null }
366+ < span className = "truncate max-w-[84px]" >
367+ { tpl ?. name || tool . identifier }
368+ </ span >
369+ </ span >
370+ ) ;
371+ } ) }
372+ < span className = "text-[10px] text-blue-500 ml-1" > Edit</ span >
373+ </ div >
374+ ) ;
375+ } ) ( ) }
376+ </ div >
377+ ) }
378+
342379 { /* Widget */ }
343380 { ! readonly &&
344381 widgetConfig &&
0 commit comments