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:
1 parent
538b0a5a69
commit
df06fd1a89
1 file changed
+5
-1
@@ -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)},
|
||||
|
||||
Reference in new issue
Block a user