Commit Graph
2234 Commits
Author SHA1 Message Date
Michael Panchenko 2ab807a1ff Merge pull request #1075 from oraios/fix/batch_hover_optimization
Fix: the request_info for a batch of symbols was actually never optimized
2026-02-24 18:03:28 +01:00
Michael Panchenko 229ce04312 Fix: the request_info for a batch of symbols was actually never optimized 2026-02-24 17:29:31 +01:00
Michael Panchenko 66a3ca8a31 Merge pull request #1076 from cx-alberto-simoes/PR/GlobalMetals
[SCALA LSP] Do not reinstall metals if it is globally available on system
2026-02-24 16:05:03 +01:00
Michael Panchenko db9fa3a370 Merge pull request #1077 from oraios/manual_banner_rotation
Dashboard: Replace automatic banner rotation with random initial display and manual rotation
2026-02-24 15:58:27 +01:00
Michael Panchenko a35ba3a597 Dashboard: Replace automatic banner rotation with random initial display and manual arrows
Replace the automatic timed banner rotation with a random initial banner
selection and small, manually operated arrow buttons for navigation.
Previous behavior can be restored by setting BannerRotation.automaticRotationEnabled to true.

The original slides used position:absolute + opacity for transitions.
This was changed to display:none/block because absolutely positioned
children don't contribute to their parent container's dimensions, causing
the banner containers to collapse to zero width/height. The arrow buttons
(position:absolute, top:50%) need a parent with real dimensions to
center correctly. With display:none/block, the active slide determines
the container's natural size.

The fixed height:60px on .gold-banner was removed for the same reason —
it clipped banner images that are taller than 60px.

An explicit height was added to .header-banner to ensure the arrow
buttons can vertically center via top:50% within the platinum banner area.
2026-02-24 15:12:55 +01:00
Dominik Jain 0c95433fb9 Merge pull request #835 from tkruse/main
Eclipse JDTLS: Add use_system_java_home, gradle_wrapper_enabled and gradle_java_home to support usage in context with restrictive gradle wrapper
2026-02-24 14:04:39 +01:00
Thibault Kruse 8c2f303636 835: Add an LS-specific settings use_system_java_home, gradle_wrapper_enabled and gradle_java_home
* fixes serena startup in cases where projects have a gradle wrapper which requires a specific JRE
2026-02-24 14:03:25 +01:00
Dominik Jain d7557b2033 Merge pull request #1074 from oraios/fix-agent-init
Improvements in SerenaAgent.__init__
2026-02-24 13:49:45 +01:00
Ariadne[bot] (butterflysky-ai)andClaude Opus 4.6 733c80bd46 Fix flaky file cache invalidation test
The test wrote two values to a file and relied on a 3-second sleep for
the filesystem mtime to advance, which fails when both writes land in
the same second (ext4/tmpfs have 1-second mtime granularity).

Fix: use os.utime() to explicitly bump mtime after the second write.
This is deterministic, instant, and tests the actual cache invalidation
logic (mtime comparison) rather than hoping the clock advances.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:44:33 +01:00
Dominik Jain 45ee5fe336 Inline method load_project_from_path_or_name 2026-02-24 12:53:41 +01:00
Dominik Jain 1b8fe642ad Use preloaded RegisteredProject in _single_project_context_tool_inclusion_definitions
to avoid loading the full project more than once (only needs ProjectConfig)
2026-02-24 12:45:04 +01:00
Dominik Jain 926d569cd6 Simplify determination of language backend to use
and move the code to the proper place (not in the middle of toolset determination)
2026-02-24 12:38:21 +01:00
Michael Panchenko e7a562aa4d Merge pull request #1060 from mareurs/per-project-language-backend
feat: support per-project language_backend override
2026-02-24 12:26:04 +01:00
Dominik Jain 0a91cccdc8 Merge pull request #1073 from oraios/content-replacer
Refactoring: Factor out ContentReplacer, move text_utils
2026-02-24 12:22:26 +01:00
Marius AilincaandClaude Opus 4.6 6decf2e8d1 Docs: document per-project language_backend override; move field to SharedConfig
- Add "Per-Project Configuration" section to JetBrains plugin docs
  with cross-reference anchor for linking from other pages
- Add language_backend to project configuration feature list in workflow docs
- Add cross-reference from global config docs to per-project override
- Move language_backend field from ProjectConfig to SharedConfig,
  following the same pattern as symbol_info_budget (review feedback)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:53:08 +02:00
Dominik Jain e38d8de21b Factor out ContentReplacer from ReplaceContentTool 2026-02-24 11:33:21 +01:00
Dominik Jain 15ab4e7747 Move test_utils to util package 2026-02-24 11:29:06 +01:00
Alberto Simoes 9a88793f7d - Require coursier only if metals is not found
- Before looking for metals in the serena lsp folder, search for it
  globally
2026-02-24 07:31:29 +00:00
Dominik Jain 1e89449f40 Improve description of 'symbol_info_budget' 2026-02-23 21:43:39 +01:00
Michael Panchenko a0d2ed99fb Docstring: highlighted possibility to analyze dependencies with JBFindSymbol
Models tend to not understand this until instructed, instead resorting to their internal much less efficient tools by default.
2026-02-23 19:37:42 +01:00
Michael Panchenko 1db52b16bf Overview tool: raise ValueError for directory paths (if multiple LS are active)
The error is raised through `LanguageServerManager.get_language_server`, where it is done conservatively (only if multiple LS are available and we can't decide)
2026-02-23 19:32:41 +01:00
by22Jy bc9bd9085e feat: Add topic grouping support for memories (#1058) 2026-02-23 18:56:34 +01:00
Michael Panchenkoandjoachim.arting 6214b46e7b feat(csharp): add .slnx solution file support (#1056)
Co-authored-by: joachim.arting <joachim.arting@gmail.com>
2026-02-23 13:49:15 +01:00
Michael Panchenko e9ccd3360f Minor renaming, removed usage of private attrs in tests 2026-02-23 13:45:19 +01:00
Michael Panchenko aee0123338 Merge branch 'main' into per-project-language-backend 2026-02-23 13:35:11 +01:00
de186907f2 Update Kotlin Language Server to v261.13587.0 and refactor it to use DependencyProvider (#1061)
---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Michael Panchenko <michael.panchenko@oraios-ai.de>
2026-02-23 12:35:13 +01:00
joachim.arting 88cd3c27a2 feat(csharp): add .slnx solution file support 2026-02-23 09:08:18 +01:00
Marius AilincaandClaude Opus 4.6 e783bdbc1b feat: support per-project language_backend override
Determine the effective language backend at startup:
- If a startup project has a per-project override, use it
- Otherwise use the global config

Post-init activation of a project with a different backend returns
an error with workarounds (startup activation or separate MCP server
per backend). No dynamic tool swapping — the exposed toolset is fixed
for the session.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 01:10:29 +02:00
Hyun-Gyu (Ethan) KimandClaude Opus 4.6 5d417beb80 Add SystemVerilog language server support using slang-langserver (#990)
* Add SystemVerilog language server support using slang-langserver

- Add Language.SYSTEMVERILOG enum with .sv, .svh, .v, .vh file support
- Create SystemVerilogLanguageServer class with auto-download for Linux, macOS, Windows
- Add pytest marker and basic test cases for symbol retrieval

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix ruff lint errors by updating configuration

- Add UP042, PLW0108, PLC0207 to ruff ignore list (style preferences)
- Update test repo pyproject.toml to use lint.select and lint.isort sections

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Replace slang-langserver with verible-verilog-ls for SystemVerilog

slang v7.0 release URLs return 404 as the project stopped providing
pre-built binaries after v3.0. Migrate to Verible (CHIPS Alliance)
which actively maintains binary releases for all major platforms.

Changes:
- Update RuntimeDependency URLs to Verible v0.0-4051-g9fdb4057
- Add Linux ARM64 platform support
- Update fallback and error messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add SystemVerilog language server support using slang-langserver

- Add Language.SYSTEMVERILOG enum with .sv, .svh, .v, .vh file support
- Create SystemVerilogLanguageServer class with auto-download for Linux, macOS, Windows
- Add pytest marker and basic test cases for symbol retrieval

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Replace slang-langserver with verible-verilog-ls for SystemVerilog

slang v7.0 release URLs return 404 as the project stopped providing
pre-built binaries after v3.0. Migrate to Verible (CHIPS Alliance)
which actively maintains binary releases for all major platforms.

Changes:
- Update RuntimeDependency URLs to Verible v0.0-4051-g9fdb4057
- Add Linux ARM64 platform support
- Update fallback and error messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix Verible binary paths for macOS and Windows

The archive directory names differ per platform:
- Linux: verible-v0.0-4051-g9fdb4057/bin/
- macOS: verible-v0.0-4051-g9fdb4057-macOS/bin/
- Windows: verible-v0.0-4051-g9fdb4057-win64/ (no bin/ subdirectory)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update docs and comments: slang-langserver → verible-verilog-ls

- Update pyproject.toml marker description
- Update ls_config.py docstring
- Update test file docstrings
- Remove unused _slang_available() function

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add verible-verilog-ls to CI and improve SystemVerilog LS

- Add verible-verilog-ls installation step to pytest.yml for
  Linux/macOS/Windows (GitHub Releases, follows ZLS pattern)
- Remove unused threading import and server_ready Event
- Add capability validation (assert textDocumentSync, warn on
  missing documentSymbolProvider/definitionProvider)
- Add window/logMessage notification handler
- Add codeAction, formatting, documentHighlight capabilities
- Improve error message with conda/Homebrew/GitHub install methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add verible detection tests and remove redundant ALU tests

Add comprehensive unit tests for verible-verilog-ls binary detection
logic (PATH lookup, version logging, graceful degradation, download
fallback). Remove duplicate ALU symbol tests that tested the same
LSP operations already covered by counter tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix SystemVerilog LSP convention deviations from code review

- Add client/registerCapability handler (all other 31 LSPs have it)
- Add locale: en to initialize params (project convention)
- Change log.debug to log.info for window/logMessage handler
- Fix dead code in test_find_references_cross_file skip/assert logic
- Move repeated imports to module top level in detection tests
- Remove unused IS_WINDOWS/IS_UNIX variables and sys import
- Fix hardcoded line number comment to semantic description

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix Windows CI verible path: flat zip structure has no bin/ subdir

The Windows verible zip extracts to verible-VERSION-win64/ with
executables directly in the root (no bin/ subdirectory), unlike
Linux/macOS tar.gz which have bin/ subdirectory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix macOS CI verible path: tar.gz extracts with -macOS suffix

Each platform has different directory naming in verible releases:
- Linux: verible-VERSION/bin/ (no suffix)
- macOS: verible-VERSION-macOS/bin/ (has -macOS suffix)
- Windows: verible-VERSION-win64/ (flat, no bin/ subdir)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Refactor: read Verible version from settings instead of hardcoding

Extract hardcoded version string into _custom_settings.get("verible_version")
with the current version as default. This allows version override via
project.yml without changing source code.

Also introduce DEFAULT_VERIBLE_VERSION constant in detection tests
for consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add rename tests and strengthen existing SystemVerilog tests

- Add TestSystemVerilogRename: within-file, cross-file, module rename
- Strengthen all existing tests with exact position/value verification
- Remove all pytest.skip, replace with assert (review feedback)
- Remove isinstance check in _find_symbol_by_name (review feedback)
- Extract _extract_hover_text and _extract_changes helpers
- Remove test_diagnostics (requires shared ls.py fix, separate PR)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 21:08:32 +01:00
Michael Panchenko dcbf08520d Merge pull request #956 from n-r-w/hover_budget 2026-02-20 17:44:23 +01:00
Michael Panchenko a7bda849f4 Use a single SharedConfig instead of 4 classes from which both configs inherit 2026-02-20 17:39:25 +01:00
Michael Panchenko f6874be852 Minor: empty instead of null in yaml [ci skip] 2026-02-20 17:39:25 +01:00
Dominik Jain 5bb6ff4746 test_open_file_cache_invalidate: Add delay to hopefully improve robustness 2026-02-20 15:57:19 +01:00
Dominik Jain 9f34099ba6 Merge pull request #1059 from mareurs/fix/avoid-unnecessary-lsp-didopen-didclose
fix: avoid unnecessary didOpen/didClose LSP calls for cached files in full symbol tree
2026-02-20 15:51:42 +01:00
Dominik Jain ce246c2d39 Clarify that plugin installation should be on the host only 2026-02-20 15:05:38 +01:00
Dominik Jain 49077e1533 _request_document_symbols: Simplify opening of the file buffer
By applying the _open_file_context context manager, we avoid the need for
calling ensure_open_in_ls explicitly
2026-02-20 14:59:05 +01:00
Michael Panchenko e62f518e4e FindReferences tools - remove include_info parameter
Rationale: requesting the info is just not worth it. The risk of the tool being slow or the info bloating the answer unnecessarily are too high. If an agent needs more info about the found references, it can get this info by itself in subsequent tool calls,
2026-02-20 14:56:10 +01:00
Michael Panchenko 9c50d2882a Added a base class ToolBehaviorConfig, renamed hover to symbol_info
The latter because we likely will eventually start using the same field for JB tools
2026-02-20 14:41:42 +01:00
Dominik Jain d7d3435abe Improve WSL usage information for JetBrains plugin #1057 2026-02-20 14:39:27 +01:00
Marius AilincaandClaude Opus 4.6 7e72ef30bf fix: avoid unnecessary didOpen/didClose LSP calls for cached files in full symbol tree
request_full_symbol_tree was opening every file in the language server
(sending didOpen + didClose notifications) even when document symbols
were already cached. For a ~600 file Kotlin project, this caused 1198
unnecessary pipe writes to the LSP process, taking ~9 seconds.

By passing open_in_ls=False, files are only read locally for cache
validation. The LSP is only notified when a cache miss requires
re-parsing. This reduces full-project symbol tree time from ~9.5s
to ~0.5s (19x improvement) on cached runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:24:06 +02:00
Dominik Jain d66152bc29 JetBrainsPluginClient: Improve error message when no plugin found,
asking the use to open the project in the IDE

Resolves #1019
2026-02-20 12:29:19 +01:00
aleksbeloushkin-srb db9980f0ed feat: add save and clear log buttons to dashboard log page (#1050) 2026-02-19 18:52:30 +01:00
Michael Panchenko 4086ce5e6e Merge branch 'main' into hover_budget
# Conflicts:
#	src/serena/config/serena_config.py
#	src/serena/symbol.py
#	src/serena/tools/symbol_tools.py
#	src/solidlsp/ls.py
#	test/serena/test_symbol.py
2026-02-19 17:44:15 +01:00
Dominik Jain 3791c1b050 CSharpLanguageServer: Make clear that pwsh is required 2026-02-19 17:23:46 +01:00
Dominik Jain c8d35d8d5f Improve exception message (ask for language to be reported) 2026-02-19 17:23:20 +01:00
TJ Kolleh 1ea5f0c25f feat(scala): Add stale lock detection for Metals H2 database (#1012)
* feat(scala): Add stale lock detection for Metals H2 database

Add detection and automatic cleanup of stale Metals H2 database locks
to improve multi-instance support. When a Metals process crashes without
proper cleanup, it can leave a lock file that prevents proper AUTO_SERVER
coordination with new instances.

Changes:
- Add metals_db_utils.py with detection logic for stale locks
- Add StaleLockMode enum (auto-clean/warn/fail) for configurable behavior
- Add MetalsStaleLockError exception for fail mode
- Integrate stale lock checking into ScalaLanguageServer init
- Add configuration options: on_stale_lock, log_multi_instance_notice
- Add comprehensive unit tests for detection logic

This enhancement allows Serena's Metals to coexist with VS Code or other
editors running Metals on the same project, with proper handling of edge
cases like crashed processes.

* test(scala): Add integration tests for stale lock handling modes

Add 7 integration tests for ScalaLanguageServer stale lock detection:
- AUTO_CLEAN mode cleans stale locks and proceeds
- WARN mode logs warning without cleanup
- FAIL mode raises MetalsStaleLockError
- ACTIVE_INSTANCE logs info when notice enabled
- ACTIVE_INSTANCE silent when notice disabled
- NO_DATABASE proceeds silently
- NO_LOCK proceeds silently

Tests use mocking to avoid requiring Java/Coursier/Metals.

* docs(scala): Add multi-instance and stale lock documentation

Document Metals multi-instance support via H2 AUTO_SERVER:
- Explain how multiple Metals instances share database and Bloop
- Document memory considerations (~500MB per JVM)
- Add stale lock detection configuration options
- Document on_stale_lock modes (auto-clean, warn, fail)
- Add YAML configuration examples

* docs: Clean up docs

Removed memory considerations and additional configuration sections from the Scala setup guide.

* refactor(scala): Extract settings helper and add module-level constants

- Add DEFAULT_METALS_VERSION, DEFAULT_CLIENT_NAME, DEFAULT_ON_STALE_LOCK,
  DEFAULT_LOG_MULTI_INSTANCE_NOTICE constants to eliminate duplication
- Extract _get_scala_settings() pure function for centralized settings parsing
- Remove redundant cleanup_stale_lock import
- Add warning log when AUTO_CLEAN mode fails to remove stale lock
- Simplify lock path handling with ternary expression

This refactoring improves code maintainability by centralizing Scala
settings extraction and applying functional programming principles.

* chore(scala): fix typo in docstring and comments
2026-02-19 13:30:05 +01:00
Dominik Jain 547a938832 Make thinking tools optional (disabled by default) 2026-02-17 14:52:45 +01:00
Dominik Jain f117196989 Add section on logs to usage documentation 2026-02-17 14:05:54 +01:00
Dominik Jain 16c2124feb Disable other TestSwiftLanguageServerBasics::test_request_references_* tests in CI #1039 2026-02-15 22:39:30 +01:00
Dominik Jain 7f8c6311fb Merge pull request #1046 from oraios/robust-plugin-path-matching
JetBrainsPluginClient: Generalise path matching
2026-02-15 21:27:45 +01:00