feat(agentctl): refreshView after discovery headless ops (Phase 545)
Call refreshView after list, publish, refresh, and filter discovery 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.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`).
|
||||
|
||||
**v0.8.506 (Phase 543):** Headless soundboard ops call `refreshView` after play/upload/delete. Bundle: `npm run test:agentctl-phase543-soundboard` (chains `test:agentctl-phase527-soundboard`).
|
||||
|
||||
+12
-4
@@ -548,12 +548,16 @@ class HeadlessSession {
|
||||
|
||||
async listPublicDiscovery () {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
return this.platform.listPublicDiscovery()
|
||||
const out = await this.platform.listPublicDiscovery()
|
||||
await this.refreshView()
|
||||
return out
|
||||
}
|
||||
|
||||
async publishDiscoveryListing (guildId, listed = true) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
return this.platform.setGuildDiscoveryListing(guildId, listed)
|
||||
const out = await this.platform.setGuildDiscoveryListing(guildId, listed)
|
||||
await this.refreshView()
|
||||
return out
|
||||
}
|
||||
|
||||
async joinPublicDiscovery (inviteCode) {
|
||||
@@ -565,12 +569,16 @@ class HeadlessSession {
|
||||
|
||||
async refreshPublicDiscovery () {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
return this.platform.refreshDiscoveryListingsFromMesh()
|
||||
const out = await this.platform.refreshDiscoveryListingsFromMesh()
|
||||
await this.refreshView()
|
||||
return out
|
||||
}
|
||||
|
||||
async setDiscoveryFilter (filter = {}) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
return this.platform.setDiscoveryFilter(filter)
|
||||
const out = await this.platform.setDiscoveryFilter(filter)
|
||||
await this.refreshView()
|
||||
return out
|
||||
}
|
||||
|
||||
async sendFriendRequest (opts = {}) {
|
||||
|
||||
Reference in New Issue
Block a user