File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -15,22 +15,15 @@ export function getDisplayName(metadata: BaseMetadata): string {
15
15
if ( metadata . title !== undefined && metadata . title !== '' ) {
16
16
return metadata . title ;
17
17
}
18
-
18
+
19
19
// Then check for annotations.title (only present in Tool objects)
20
20
if ( 'annotations' in metadata ) {
21
21
const metadataWithAnnotations = metadata as BaseMetadata & { annotations ?: { title ?: string } } ;
22
22
if ( metadataWithAnnotations . annotations ?. title ) {
23
23
return metadataWithAnnotations . annotations . title ;
24
24
}
25
25
}
26
-
26
+
27
27
// Finally fall back to name
28
28
return metadata . name ;
29
29
}
30
-
31
- /**
32
- * Checks if an object has a custom title different from its name.
33
- */
34
- export function hasCustomTitle ( metadata : BaseMetadata ) : boolean {
35
- return metadata . title !== undefined && metadata . title !== metadata . name ;
36
- }
You can’t perform that action at this time.
0 commit comments