The contacts command tolerates a context with no place service

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Haiku 5.5 committed 2026-11-03 03:06:56 -05:00
1 parent 538b0a5a69
commit df06fd1a89
1 file changed
+5 -1
+5 -1
View File
@@ -93,8 +93,12 @@ class ContactsTool(Tool):
sort = ContactsSort.from_name(sort_name)
# The CLI reads the stored places only. It never starts the job that finds them.
places = getattr(ctx, "places", None)
listing = _listing(
ordered_contacts(contacts, counts, sort), counts, prefix_bytes, ctx.places.get
ordered_contacts(contacts, counts, sort),
counts,
prefix_bytes,
places.get if places is not None else None,
)
return ToolResult(
summary={"contacts": len(contacts)},