Skip to content

Commit 5bec008

Browse files
committed
ToolsTab: truncate tool descriptions for nicer rendering
1 parent cf9acf6 commit 5bec008

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

client/src/components/ToolsTab.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const ToolsTab = ({
9595
renderItem={(tool) => (
9696
<div className="flex flex-col items-start">
9797
<span className="flex-1">{tool.name}</span>
98-
<span className="text-sm text-gray-500 text-left">
98+
<span className="text-sm text-gray-500 text-left line-clamp-3">
9999
{tool.description}
100100
</span>
101101
</div>
@@ -114,9 +114,12 @@ const ToolsTab = ({
114114
<div className="p-4">
115115
{selectedTool ? (
116116
<div className="space-y-4">
117-
<p className="text-sm text-gray-600 dark:text-gray-400">
117+
<div className="text-sm font-medium">Description</div>
118+
<div className="text-sm text-gray-600 dark:text-gray-400 whitespace-pre-wrap max-h-48 overflow-y-auto">
118119
{selectedTool.description}
119-
</p>
120+
</div>
121+
<hr className="border-t border-gray-300 my-4" />
122+
<div className="text-sm font-medium">Inputs & Outputs</div>
120123
{Object.entries(selectedTool.inputSchema.properties ?? []).map(
121124
([key, value]) => {
122125
const prop = normalizeUnionType(value as JsonSchemaType);

0 commit comments

Comments
 (0)