This commit is contained in:
2026-01-12 20:01:45 -08:00
parent be55e6e450
commit 2870abf4de
7 changed files with 2083 additions and 52 deletions

View File

@@ -322,15 +322,23 @@ def _emit_tags_as_table(
This replaces _print_tag_list to make tags pipe-able.
Stores the table via ctx.set_last_result_table_overlay (or ctx.set_last_result_table) for downstream @ selection.
"""
from SYS.result_table import ResultTable
from SYS.result_table import ItemDetailView, extract_item_metadata
# Create ResultTable with just tag column (no title)
# Keep the title stable and avoid including hash fragments.
table_title = "tag"
# Prepare metadata for the detail view
metadata = extract_item_metadata(subject)
# Overlays/Overrides from explicit args if subject was partial
if item_title:
table_title = f"tag: {item_title}"
metadata["Title"] = item_title
if file_hash:
metadata["Hash"] = file_hash
if store:
metadata["Store"] = service_name if service_name else store
if path:
metadata["Path"] = path
table = ResultTable(table_title, max_columns=1)
# Create ItemDetailView
table = ItemDetailView("Tags", item_metadata=metadata, max_columns=1)
table.set_source_command("get-tag", [])
# Create TagItem for each tag