[PR #4121] fix: Autocomplete with existing space after trigger #10872

Closed
opened 2026-02-16 18:15:37 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/4121

State: closed
Merged: Yes


Fixes #4120.
Fixes #4523.

Changes:

  • The mechanism that closes the autocomplete after the user types a space after the @ trigger is now event-driven, instead of state-driven (to prevent existing text after the @ trigger from hiding the autocomplete)
  • Avoided side-effect inside memo, which is an anti-pattern

This is on my radar to add comprehensive TUI tests for. There are already a few for Autocomplete.
I did test my change thoroughly manually though.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4121 **State:** closed **Merged:** Yes --- Fixes #4120. Fixes #4523. Changes: - The mechanism that closes the autocomplete after the user types a space after the @ trigger is now event-driven, instead of state-driven (to prevent existing text after the @ trigger from hiding the autocomplete) - Avoided side-effect inside memo, which is an anti-pattern This is on my radar to add comprehensive TUI tests for. There are already a few for Autocomplete. I did test my change thoroughly manually though.
yindo added the pull-request label 2026-02-16 18:15:37 -05:00
yindo closed this issue 2026-02-16 18:15:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10872