Skip to content

fix(tabby-agent): only send tabby/chat feature registration to VS Code LSP Clients#4487

Open
datGryphon wants to merge 1 commit intoTabbyML:mainfrom
datGryphon:fix/tabby-agent-neovim-lsp-client-feature-crash
Open

fix(tabby-agent): only send tabby/chat feature registration to VS Code LSP Clients#4487
datGryphon wants to merge 1 commit intoTabbyML:mainfrom
datGryphon:fix/tabby-agent-neovim-lsp-client-feature-crash

Conversation

@datGryphon
Copy link
Copy Markdown

@datGryphon datGryphon commented Apr 28, 2026

Summary

Fixes Neovim 0.12 crash where tabby/chat registration sent via client/registerCapability caused a LuaJIT panic (table index is nil) because it is a VS Code-specific method not recognized by Neovim's LSP client.

Changes

  • src/utils/clientType.ts - Extracted getClientType(clientInfo) from telemetry.ts into a shared utility with a ClientType union type ("vscode" | "intellij" | "vim" | "unknown")

  • src/telemetry.ts - Use the shared getClientType instead of the private method

  • src/http/tabbyApiClient.ts - Store and expose clientInfo via getClientInfo() getter (previously only used it to build userAgentString)

  • src/chat/index.ts - syncFeatureRegistration() gates tabby/chat registration behind getClientType(...) === "vscode"

Verification

  • Builds, all 84 tests pass, lint clean
  • Tested locally with Neovim 0.12, completions working again through vim-tabby

Related

Fixes #4486, vim-tabby#40

ChatFeature was sending 'tabby/chat' registration to all LSP clients
regardless of type, causing Neovim 0.12+ to crash with 'table index
is nil' on unknown methods in client/registerCapability.

Extract getClientType() from telemetry.ts into a new shared util.
Store clientInfo on TabbyApiClient and expose publically.
ChatFeature uses new util and clientInfo to gate registration call.

Fixes TabbyML#4486, vim-tabby#40
@datGryphon
Copy link
Copy Markdown
Author

datGryphon commented Apr 28, 2026

I'm also looking at if/how this should be addressed at the neovim lsp client level. I'm still investigating the source of the regression on that end.

Anyway it feels like a two sided problem. Something is being sent that is unsupported, and something unsupported is not being handled properly. ¯\_(ツ)_/¯

@datGryphon datGryphon changed the title fix: only send tabby/chat feature registration to VS Code LSP Clients fix(tabby-agent): only send tabby/chat feature registration to VS Code LSP Clients Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Neovim LSP Client Crashing on unhandled tabby/chat feature registration

1 participant