Skip to content

Releases: Bojun-Vvibe/feishu-opencode-bridge

v0.3.0 — /cancel support

20 Apr 14:19
0368edb

Choose a tag to compare

Highlights

  • /cancel (alias /stop) aborts the currently running turn
  • Aborted turns render as 🛑 已取消 with partial tool outputs preserved (not as errors)
  • /new and /cwd now also abort any in-flight turn before switching
  • /status shows running-turn elapsed time

Implementation notes

  • Per-chat active turn tracked in a lock-protected dict for O(1) lookup
  • Command dispatch runs outside the conversation lock, so /cancel responds instantly even while a long-running turn holds the lock
  • Calls opencode's POST /session/{id}/abort; the in-flight POST /message then returns naturally with MessageAbortedError, which the bridge recognizes as an aborted state rather than an error

Tested

  • 22 unit tests pass (3 new for aborted-state rendering)
  • End-to-end via Feishu: long bash command → /cancel → card updates to 🛑 已取消, opencode propagates abort to the bash subprocess