@nxxxsooo/opencode-annotate 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.1 — no steer error after sending
4
+
5
+ - Send TUI annotations to an idle session as steering input instead of queued input.
6
+ OpenCode starts either one at once, but briefly listed the queued message, so an Enter on
7
+ the empty prompt right after sending tried to steer it and showed "Failed to steer pending
8
+ prompt" (HTTP 409) although the annotations had arrived. A busy session still queues them.
9
+
3
10
  ## 0.9.0 — input-method-safe keys
4
11
 
5
12
  - Switch to Slash Saver's ASCII input source while a TUI review is browsed (OpenCode and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxxxsooo/opencode-annotate",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Unofficial OpenCode plugin: annotate replies, documents and webpages, then send the feedback to the originating session.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/review.mjs CHANGED
@@ -269,8 +269,12 @@ export function createReviewCommand(context, options = {}) {
269
269
  keepDraft = archived > 0
270
270
  return notice(`Sending cancelled.${retainedArchive}`)
271
271
  }
272
+ // An idle session starts queued input at once, but OpenCode's prompt can still list it
273
+ // as queued; an empty Enter then tries to steer it and fails with a 409. Steering an
274
+ // idle session is equivalent and never listed as queued. A busy turn keeps the queue.
275
+ const busy = (context.data.session.status?.(sessionID) ?? "running") !== "idle"
272
276
  await context.client.session.prompt({
273
- sessionID, id: promptID, text, delivery: "queue", resume: true,
277
+ sessionID, id: promptID, text, delivery: busy ? "queue" : "steer", resume: true,
274
278
  })
275
279
  keepDraft = archived > 0
276
280
  notice(`Sent ${count} ${count === 1 ? "annotation" : "annotations"}.${retainedArchive}`, "success")