fix(ui): show glob pattern in tool description

This commit is contained in:
Bohdan Triapitsyn
2026-08-01 21:32:06 +03:00
parent 86ef96302d
commit 4cab15605a
3 changed files with 28 additions and 1 deletions
@@ -29,3 +29,16 @@ export const isStandaloneTool = (toolName: unknown): boolean => {
export const isStaticTool = (toolName: unknown): boolean => {
return STATIC_TOOL_NAMES.has(normalizeToolName(toolName));
};
export const getToolDescriptionFallback = (
toolName: unknown,
description: unknown,
input: Record<string, unknown> | undefined,
): string => {
if (typeof description === 'string' && description.trim().length > 0) {
return description;
}
const globPattern = normalizeToolName(toolName) === 'glob' ? input?.pattern : undefined;
return typeof globPattern === 'string' ? globPattern : '';
};