feat(agentctl): refreshView after contacts headless ops (Phase 546)
Call refreshView after send, accept, and decline friend request helpers. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -17,6 +17,8 @@ Both modes use **`pearcord-ui-flow` `dispatchUiMessage`** — the same handler a
|
||||
|
||||
`AgentClient` resolves RPC replies before treating `{ event: "state" | "sidecar" }` push lines as events (fixes `wait-event` responses that include an `event` field).
|
||||
|
||||
**v0.8.509 (Phase 546):** Headless contacts ops call `refreshView` after send/accept/decline. Bundle: `npm run test:agentctl-phase546-contacts` (chains `test:agentctl-phase530-contacts`).
|
||||
|
||||
**v0.8.508 (Phase 545):** Headless discovery ops call `refreshView` after list/publish/refresh/filter. Bundle: `npm run test:agentctl-phase545-discovery` (chains `test:agentctl-phase529-discovery`).
|
||||
|
||||
**v0.8.507 (Phase 544):** Headless presence ops call `refreshView` after status/activity changes. Bundle: `npm run test:agentctl-phase544-presence` (chains `test:agentctl-phase528-presence`).
|
||||
|
||||
+9
-3
@@ -583,20 +583,26 @@ class HeadlessSession {
|
||||
|
||||
async sendFriendRequest (opts = {}) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
return this.platform.sendFriendRequest({
|
||||
const out = await this.platform.sendFriendRequest({
|
||||
peerUserId: opts.peerUserId,
|
||||
peerDisplayName: opts.peerDisplayName
|
||||
})
|
||||
await this.refreshView()
|
||||
return out
|
||||
}
|
||||
|
||||
async acceptFriendRequest (peerUserId) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
return this.platform.acceptFriendRequest(peerUserId)
|
||||
const out = await this.platform.acceptFriendRequest(peerUserId)
|
||||
await this.refreshView()
|
||||
return out
|
||||
}
|
||||
|
||||
async declineFriendRequest (peerUserId) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
return this.platform.declineFriendRequest(peerUserId)
|
||||
const out = await this.platform.declineFriendRequest(peerUserId)
|
||||
await this.refreshView()
|
||||
return out
|
||||
}
|
||||
|
||||
async openDmWithPeer (peerUserId, peerDisplayName) {
|
||||
|
||||
Reference in New Issue
Block a user