This commit is contained in:
2026-01-02 02:28:59 -08:00
parent deb05c0d44
commit 6e9a0c28ff
13 changed files with 1402 additions and 2334 deletions

23
CLI.py
View File

@@ -3824,9 +3824,28 @@ class PipelineExecutor:
# Fall back to default selection rendering on any failure.
pass
items = piped_result if isinstance(piped_result, list) else [piped_result]
# Special-case: selecting notes should show the text content directly.
note_like_items = [
i for i in items
if isinstance(i, dict) and ("note_text" in i or "note" in i)
]
if note_like_items:
for idx, item in enumerate(note_like_items, 1):
note_name = str(
item.get("note_name")
or item.get("name")
or f"note {idx}"
).strip()
note_text = str(item.get("note_text") or item.get("note") or "")
note_text = note_text[:999]
stdout_console().print()
stdout_console().print(f"{note_name}:\n{note_text}")
ctx.set_last_result_items_only(items)
return
table = ResultTable("Selection Result")
items = piped_result if isinstance(piped_result,
list) else [piped_result]
for item in items:
table.add_result(item)
ctx.set_last_result_items_only(items)