Skip to content

Snippets autocompletion nav (up/down) stopped working on OC 0.16.x #36

@bew

Description

@bew

Hello!

I recently upgraded from OC 0.15.13 to 0.16.2 and I noticed that up/down navigation in the autocomplete popup shown on #foo doesn't work anymore.

They still work correctly for OC's builtin autocompletes like /foo or @foo, just not for snippets.
(NOTE: I've also now customized the keys used to navigate up/down using keybindsprompt.autocomplete.{prev,next} in tui.jsonc, but I also checked #foo nav is broken without my custom keybindings)

I checked the release notes of OC 0.16.0 (commits v1.15.13...v1.16.0)
👉 I found a potential commit that changes keybinds handling in OC: anomalyco/opencode#30077 (commit)

What do you think?


Pinging author of that potential PR: @simonklee
(sorry for the direct ping but you might be able to help here 🤔)
A quick look around in this plugin's codebase seems to indicate that autocomplete is implemented with this component:

function PromptWithSnippetAutocomplete(props: {

And the keyboard event handling:
const handleNavigationKey = (evt: {

👉 What needs to be changed in the plugin to support the new autocomplete, potentially with new up/down customizations? 🤔
Or if you can point to up-to-date documentation for this I can try to take a look..
(although I don't have much experience with TypeScript)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions