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