fix(agentctl): refresh view after stage and send with attachments
Headless attachment helpers now match reaction/messaging refreshView semantics for Phase 556 agentctl verification. 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.519 (Phase 556):** Headless `stageGuildAttachment` and `sendGuildMessageWithAttachments` call `refreshView` after mutations. Bundle: `npm run test:agentctl-phase556-attachments` (chains `test:agentctl-phase522-attachments`).
|
||||
|
||||
**v0.8.518 (Phase 555):** Headless `toggleGuildReaction` calls `refreshView` after toggle. Bundle: `npm run test:agentctl-phase555-reactions` (chains `test:agentctl-phase521-reactions`).
|
||||
|
||||
**v0.8.517 (Phase 554):** Headless `sendGuildMessage`/`editGuildMessage`/`deleteGuildMessage` call `refreshView` after mutations. Bundle: `npm run test:agentctl-phase554-messaging` (chains `test:agentctl-phase520-messaging`).
|
||||
|
||||
+6
-2
@@ -947,12 +947,16 @@ class HeadlessSession {
|
||||
|
||||
async stageGuildAttachment (opts) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
return this.platform.stageAttachment(opts)
|
||||
const out = await this.platform.stageAttachment(opts)
|
||||
await this.refreshView()
|
||||
return out
|
||||
}
|
||||
|
||||
async sendGuildMessageWithAttachments (content, attachmentIds, opts = {}) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
return this.platform.sendMessage(content, { ...opts, attachmentIds })
|
||||
const out = await this.platform.sendMessage(content, { ...opts, attachmentIds })
|
||||
await this.refreshView()
|
||||
return out
|
||||
}
|
||||
|
||||
async sendGuildEmbedMessage (content) {
|
||||
|
||||
Reference in New Issue
Block a user