- query_project: Support use of project root instead of project name
- list_queryable_projects: Return both project names and project roots
Resolves#1388
This allows the stateful handling introduced for #1370#1372
to correctly apply to HTTP mode as well, by adjusting tools to be session-aware:
* InitialInstructionsTool
* ActivateProjectTool
* Not included in client-relevant interface
* Injected via apply_ex if apply defines the parameter
(apply should never document the parameter, notably)
The LSP v3.17 spec defines DocumentSymbol.children as an optional list
of nested DocumentSymbol entries. The field was absent from the TypedDict,
causing type checkers to flag access to 'children' on DocumentSymbol
objects and requiring # type: ignore workarounds in ls.py.
* Add "Quick Demo" section with new videos
* Remove old section "Serena in Action"
* Update section "How Serena Works", removing redundant part explaining backends (this is what the next section handles)
* Fix Lean4 stale cache: skip caching empty document symbol responses
When the Lean language server is queried before `lake build` completes,
it returns empty symbol lists. Previously these were written to the
persistent cache, permanently hiding symbols even after the build
finished. Now only non-empty responses are cached.
Adds a unit test that verifies empty responses from the LSP layer are
never written to _raw_document_symbols_cache.
Fixes#1217
* fix: run poe format and add changelog entry for #1356
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Michael Panchenko <35432522+MischaPanch@users.noreply.github.com>
Summary
relax clangd initialize capability checks to tolerate valid response shape differences
add a clangd-specific document-symbol cache fingerprint so stale C++ symbol caches are invalidated when backend/config state changes
add a regression test covering C++ document-symbol cache invalidation
Problem
For C++ projects, Serena's symbol tools could keep returning malformed cached document symbols even after clangd / compile commands / backend state had been repaired. The cache key was effectively stable as long as file contents did not change, so previously bad symbol trees could survive later LS recovery.
In addition, clangd capability checks were too strict and assumed a single exact initialize-response shape.
What this changes
accepts both integer and object-style textDocumentSync responses
validates completionProvider more conservatively by checking required trigger characters instead of exact equality
fingerprints clangd document-symbol caches using:
clangd_version
ls_path
compile_commands_dir
compile_commands.json content hash
adds a C++ regression test similar to the existing Go cache invalidation coverage