File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ export class UIRegistry {
8383 }
8484
8585 // Check if we have a mapping for this tool
86- const htmlFileName = uiMap [ toolName ] ;
87- if ( ! htmlFileName ) {
86+ const componentName = uiMap [ toolName ] ;
87+ if ( ! componentName ) {
8888 return undefined ;
8989 }
9090
@@ -93,8 +93,8 @@ export class UIRegistry {
9393 return this . cache . get ( toolName ) ;
9494 }
9595
96- // Try to load from disk
97- const filePath = join ( this . uiDistPath , htmlFileName ) ;
96+ // Try to load from disk (component name -> HTML file)
97+ const filePath = join ( this . uiDistPath , ` ${ componentName } .html` ) ;
9898 if ( ! existsSync ( filePath ) ) {
9999 return undefined ;
100100 }
Original file line number Diff line number Diff line change 11/**
2- * Mapping from tool names to their bundled UI HTML file names
2+ * Mapping from tool names to their UI component names.
33 * Tool names use kebab-case (e.g., 'list-databases')
4- * HTML files use PascalCase (e.g., 'ListDatabases.html')
4+ * Component names use PascalCase (e.g., 'ListDatabases')
5+ *
6+ * The component name corresponds to the folder in src/ui/components/
7+ * The registry handles resolving this to the built HTML file.
58 */
69export const uiMap : Record < string , string > = {
7- "list-databases" : "ListDatabases.html " ,
10+ "list-databases" : "ListDatabases" ,
811} ;
You can’t perform that action at this time.
0 commit comments