diff --git a/web/src/pages/Tools.tsx b/web/src/pages/Tools.tsx index 1d842ab60..eb10dc5b7 100644 --- a/web/src/pages/Tools.tsx +++ b/web/src/pages/Tools.tsx @@ -16,6 +16,8 @@ export default function Tools() { const [cliTools, setCliTools] = useState([]); const [search, setSearch] = useState(''); const [expandedTool, setExpandedTool] = useState(null); + const [agentSectionOpen, setAgentSectionOpen] = useState(true); + const [cliSectionOpen, setCliSectionOpen] = useState(true); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); @@ -70,104 +72,128 @@ export default function Tools() { {/* Agent Tools Grid */}
-
+
+ + + - {filtered.length === 0 ? ( -

{t('tools.empty')}

- ) : ( -
- {filtered.map((tool) => { - const isExpanded = expandedTool === tool.name; - return ( -
-
-

- {tool.description} -

- - - {isExpanded && tool.parameters && ( -
-

- {t('tools.parameter_schema')} +

+ {tool.description}

-
-                        {JSON.stringify(tool.parameters, null, 2)}
-                      
-
- )} -
- ); - })} -
- )} + + + {isExpanded && tool.parameters && ( +
+

+ {t('tools.parameter_schema')} +

+
+                          {JSON.stringify(tool.parameters, null, 2)}
+                        
+
+ )} + + ); + })} + + ))} + {/* CLI Tools Section */} {filteredCli.length > 0 && (
-
+
+ + + -
- - - - - - - - - - - {filteredCli.map((tool) => ( - - - - - +
+ {cliSectionOpen &&
+
{t('tools.name')}{t('tools.path')}{t('tools.version')}{t('tools.category')}
- {tool.name} - - {tool.path} - - {tool.version ?? '-'} - - - {tool.category} - -
+ + + + + + - ))} - -
{t('tools.name')}{t('tools.path')}{t('tools.version')}{t('tools.category')}
+ + + {filteredCli.map((tool) => ( + + + {tool.name} + + + {tool.path} + + + {tool.version ?? '-'} + + + + {tool.category} + + + + ))} + + +
}
)}