This commit is contained in:
2026-02-02 19:49:07 -08:00
parent 8d22ec5a81
commit 1e0000ae19
13 changed files with 297 additions and 988 deletions

View File

@@ -318,8 +318,24 @@ def _emit_tags_as_table(
) -> None:
"""Emit tags as TagItem objects and display via ResultTable.
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.
Displays tags in a rich detail panel with file context (hash, title, URL, etc).
Creates a table of individual tag items to allow selection and downstream piping.
Preserves all metadata from subject (URLs, extensions, etc.) through to display.
Makes tags @-selectable via ctx.set_last_result_table() for chaining:
- get-tag @1 | delete-tag (remove a specific tag)
- get-tag @2 | add-url (add URL to tagged file)
Args:
tags_list: List of tag strings to display
file_hash: SHA256 hash of file
store: Backend name (e.g., "hydrus", "local", "url")
service_name: Tag service name (if from Hydrus)
config: Application configuration
item_title: Optional file title to display
path: Optional file path
subject: Full context object (should preserve original metadata)
quiet: If True, don't display (emit-only mode)
"""
from SYS.result_table import ItemDetailView, extract_item_metadata