Skip to content

Commit 0134543

Browse files
committed
Filter on title
Signed-off-by: David Gageot <[email protected]>
1 parent 2960948 commit 0134543

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/extension/ui/src/components/tabs/ToolCatalog.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ const ToolCatalog: React.FC<ToolCatalogProps> = ({
2525
// Memoize the filtered catalog items to prevent unnecessary recalculations
2626
const all = useMemo(() => {
2727
const filteredItems = catalogItems.filter((item) => {
28-
return item.name.toLowerCase().includes(search.toLowerCase());
28+
return item.title.toLowerCase().includes(search.toLowerCase());
2929
});
3030

3131
return sort === 'name-asc'
3232
? filteredItems.sort((a, b) => {
33-
return a.name.localeCompare(b.name);
33+
return a.title.localeCompare(b.title);
3434
})
3535
: sort === 'name-desc'
3636
? filteredItems.sort((a, b) => {
37-
return b.name.localeCompare(a.name);
37+
return b.title.localeCompare(a.title);
3838
})
3939
: filteredItems;
4040
}, [catalogItems, search, sort]);

src/extension/ui/src/components/tile/Modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ const ConfigurationModal = ({
195195
}}
196196
/>
197197
}
198-
{catalogItem.title ?? catalogItem.name}
198+
{catalogItem.title}
199199
<Tooltip
200200
placement="right"
201201
title={

src/extension/ui/src/components/tile/Top.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default function Top({ item, onToggleRegister }: TopProps) {
5252
color: 'text.primary',
5353
}}
5454
>
55-
{item.title ?? item.name}
55+
{item.title}
5656
</Typography>
5757
}
5858
action={

src/extension/ui/src/types/catalog/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { JsonSchema } from "json-schema-library";
55
*/
66
export interface CatalogItem {
77
description?: string;
8-
title?: string;
8+
title: string;
99
source?: string;
1010
icon?: string;
1111
secrets?: { name: string }[];

0 commit comments

Comments
 (0)