fix(contacts): add view action, show phones in list, preserve fields on update#5748
Open
holden093 wants to merge 2 commits into
Open
fix(contacts): add view action, show phones in list, preserve fields on update#5748holden093 wants to merge 2 commits into
holden093 wants to merge 2 commits into
Conversation
…on update
- Add 'view' action to manage_contact: fetch a single contact by UID and
display name, UID, emails, phones, and address.
- Show phone numbers in 'list' output alongside emails.
- Preserve existing emails/phones during partial update (rename-only,
single-field updates) by fetching the current contact when either
field is missing. Uses force=True on _fetch_contacts to avoid a stale
cache masking a just-added contact.
- Fix the preserve guard: use OR instead of AND so single-field updates
like {uid, emails:[new]} don't wipe phones and vice versa.
Contributor
Author
Heads-up: the failing
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three gaps in the
manage_contactsagent tool that made phone-number workflows unreliable:listnow includes phone numbers, a newviewaction returns full contact details by UID, andupdatepreserves existing emails/phones when the caller doesn't pass them (preventing data loss on partial edits like renaming).Target branch
dev, notmain.Linked Issue
Fixes #4747
Type of Change
Checklist
devdocker compose uporuvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.How to Test
Visual / UI changes
None — backend-only change.