Skip to content

bug: sidekick sometimes shows multiple sessions for the same running tool #92

@folke

Description

@folke

Did you check docs and existing issues?

  • I have read all the sidekick.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of sidekick.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

all

Operating system/version

all

Describe the bug

In the example below, I have the mux option disabled, but I'm running Neovim inside tmux.

Then after opening opencode in a Neovim terminal, there will be three ways for sidekick to communicate with the running opencode process:

  • the Neovim terminal
  • we can use tmux paste-buffer
  • we can attach to the opencode http server started by the process

While technically, this is all correct, it's also confusing and we should be able to
detect that these are all in fact the same running process and only show one session.
Which session to show should be based on priorities, where in this case terminal > opencode_server > tmux.

Image

Steps To Reproduce

  • opts.cli.mux.enabled = false
  • start a tmux session
  • start nvim
  • toggle opencode with sidekick

Expected Behavior

only one session

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "folke/sidekick.nvim", opts = {} },
    -- add any other plugins here
  },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions