Просмотр исходного кода

refactor: remove deprecated schema column from all display views

xcad 1 месяц назад
Родитель
Сommit
e07bfdbdf1

+ 1 - 3
cli/core/display/display_table.py

@@ -92,7 +92,6 @@ class TableDisplay:
         table.add_column("Name")
         table.add_column("Tags")
         table.add_column("Version", no_wrap=True)
-        table.add_column("Schema", no_wrap=True)
         table.add_column("Library", no_wrap=True)
 
         settings = self.settings
@@ -102,7 +101,6 @@ class TableDisplay:
             tags_list = template.metadata.tags or []
             tags = ", ".join(tags_list) if tags_list else "-"
             version = str(template.metadata.version) if template.metadata.version else ""
-            schema = template.schema_version if hasattr(template, "schema_version") else "1.0"
 
             # Format library with icon and color
             library_name = template.metadata.library or ""
@@ -111,7 +109,7 @@ class TableDisplay:
             color = "yellow" if library_type == "static" else "blue"
             library_display = f"[{color}]{icon} {library_name}[/{color}]"
 
-            table.add_row(template.id, name, tags, version, schema, library_display)
+            table.add_row(template.id, name, tags, version, library_display)
 
         self.base._print_table(table)
 

+ 0 - 4
cli/core/display/display_template.py

@@ -67,7 +67,6 @@ class TemplateDisplay:
 
         template_name = template.metadata.name or settings.TEXT_UNNAMED_TEMPLATE
         version = str(template.metadata.version) if template.metadata.version else settings.TEXT_VERSION_NOT_SPECIFIED
-        schema = template.schema_version if hasattr(template, "schema_version") else "1.0"
         description = template.metadata.description or settings.TEXT_NO_DESCRIPTION
 
         # Get library information and format with icon/color
@@ -88,9 +87,6 @@ class TemplateDisplay:
         header_content.append("version:", style="white")
         header_content.append(version, style="cyan")
         header_content.append(" │ ", style="dim")
-        header_content.append("schema:", style="white")
-        header_content.append(schema, style="magenta")
-        header_content.append(" │ ", style="dim")
         header_content.append("library:", style="white")
         header_content.append(icon + " ", style=color)
         header_content.append(library_name, style=color)

+ 2 - 8
cli/core/module/base_commands.py

@@ -97,7 +97,6 @@ def list_templates(module_instance, raw: bool = False) -> list:
                 else:  # TEMPLATE_STATUS_INVALID
                     status_display = "[red]Invalid[/red]"
 
-                schema = template.schema_version if hasattr(template, "schema_version") else "1.0"
                 library_name = template.metadata.library or ""
                 library_type = template.metadata.library_type or "git"
                 # Format library with icon and color
@@ -111,12 +110,11 @@ def list_templates(module_instance, raw: bool = False) -> list:
                     name = f"[dim]{name}[/dim]"
                     tags = f"[dim]{tags}[/dim]"
                     version = f"[dim]{version}[/dim]"
-                    schema = f"[dim]{schema}[/dim]"
                     library_display = f"[dim]{icon} {library_name}[/dim]"
                 else:
                     template_id = template.id
 
-                return (template_id, name, tags, version, status_display, schema, library_display)
+                return (template_id, name, tags, version, status_display, library_display)
 
             module_instance.display.data_table(
                 columns=[
@@ -125,7 +123,6 @@ def list_templates(module_instance, raw: bool = False) -> list:
                     {"name": "Tags"},
                     {"name": "Version", "no_wrap": True},
                     {"name": "Status", "no_wrap": True},
-                    {"name": "Schema", "no_wrap": True},
                     {"name": "Library", "no_wrap": True},
                 ],
                 rows=filtered_templates,
@@ -166,7 +163,6 @@ def search_templates(module_instance, query: str) -> list:
             else:  # TEMPLATE_STATUS_INVALID
                 status_display = "[red]Invalid[/red]"
 
-            schema = template.schema_version if hasattr(template, "schema_version") else "1.0"
             library_name = template.metadata.library or ""
             library_type = template.metadata.library_type or "git"
             # Format library with icon and color
@@ -180,12 +176,11 @@ def search_templates(module_instance, query: str) -> list:
                 name = f"[dim]{name}[/dim]"
                 tags = f"[dim]{tags}[/dim]"
                 version = f"[dim]{version}[/dim]"
-                schema = f"[dim]{schema}[/dim]"
                 library_display = f"[dim]{icon} {library_name}[/dim]"
             else:
                 template_id = template.id
 
-            return (template_id, name, tags, version, status_display, schema, library_display)
+            return (template_id, name, tags, version, status_display, library_display)
 
         module_instance.display.data_table(
             columns=[
@@ -194,7 +189,6 @@ def search_templates(module_instance, query: str) -> list:
                 {"name": "Tags"},
                 {"name": "Version", "no_wrap": True},
                 {"name": "Status", "no_wrap": True},
-                {"name": "Schema", "no_wrap": True},
                 {"name": "Library", "no_wrap": True},
             ],
             rows=filtered_templates,