j
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user