Commit Graph
11 Commits
Author SHA1 Message Date
Joshua Shanks f76ed700fa Fix X11/XCB crash when running MCP server in empty directories (#278)
Summary
Fixes X11/XCB crash when running serena-mcp-server in directories without source files
Adds headless environment detection to prevent GUI operations in SSH/WSL/Docker environments
Improves error messages to provide clear guidance when no source files are found
Problem
When running serena-mcp-server --context ide-assistant --project /empty/dir in a headless environment (SSH, WSL, Docker), the application would crash with X11/XCB errors:

[xcb] Unknown sequence number while appending request
[xcb] You called XInitThreads, this is not your fault
[xcb] Aborting, sorry about that.
python: ../../src/xcb_io.c:157: append_pending_request: Assertion `\!xcb_xlib_unknown_seq_number' failed.
Root Cause
Empty directories cause ProjectConfig.autogenerate() to raise a ValueError
The exception handler attempts to show a GUI error dialog using tkinter
In headless environments, tkinter crashes with X11/XCB errors
Solution
Headless Detection: Added is_headless_environment() to detect when running without a display
Skip GUI in Headless: Modified show_fatal_exception_safe() to skip GUI attempts in headless environments
Better Error Messages: Improved the error message for empty projects with clear instructions
2025-07-06 23:21:41 +02:00
Yen 1df9732390 feature/terraform language server support (#277)
Adds terraform support
2025-07-06 22:23:18 +02:00
Michael Panchenko 2b92c48622 Minor, fixed accidental commit to settings.json 2025-05-19 12:52:24 +02:00
Michael Panchenko e48031ea73 Tests for TS and Go, general improvements in tests 2025-04-28 15:34:29 +02:00
Michael Panchenko 3ae7a6ec10 Raise errors on outdated config
Added explanation in readme and changelog
2025-04-07 21:17:54 +02:00
Michael Panchenko 78b43d2a63 LS: support for configuring ignored paths
Introduced per-language always ignored paths
2025-04-07 00:54:34 +02:00
Michael Panchenko 14f626fc3f Readme 2025-04-01 20:52:16 +02:00
Michael Panchenko 913a90b376 Minor 2025-04-01 17:16:56 +02:00
Michael Panchenko a09c31988b Added tool get_dir_overview 2025-03-25 23:36:00 +01:00
Michael Panchenko 7e8caac909 Minor 2025-03-25 20:18:13 +01:00
Michael Panchenko 0e6e03630f vscode settings 2025-03-24 23:07:19 +01:00