Commit Graph
2802 Commits
Author SHA1 Message Date
Michael Panchenko 4bd60f18d4 Tests: removed csharp tests relying on mocks 2026-05-04 19:39:58 +02:00
Michael Panchenko 2c03fe3318 Docs, minor 2026-05-04 14:30:40 +02:00
Michael Panchenko 64e604630e Merge branch 'main' into feature/cross-package-typescript-references
# Conflicts:
#	CHANGELOG.md
#	src/solidlsp/ls.py
2026-05-04 14:26:20 +02:00
Michael Panchenko f0c1568e71 LS: improved handling of additional workspace folders
Previously, a field was set outside init and generally a bunch of related code was unnecessary and poorly named.
2026-05-04 14:22:21 +02:00
meir lixenbrg 862af5b42c Add documentation for additional_workspace_folders
- Add 'Additional Workspace Folders' section to project configuration docs
- Add cross-reference note to TypeScript LS settings section
- Include configuration example and usage notes
2026-05-04 14:22:20 +02:00
meir lixenbrgandClaude Opus 4.6 34575f9898 Add support for additional_workspace_folders, currently only for TS
The TypeScript language server was initialized with a single workspace folder,
so tsserver could not discover references across sibling packages in a monorepo.

This adds an `additional_workspace_folders` setting in
`ls_specific_settings` that accepts a list of directory paths.
Each folder is registered as an LSP workspace folder during initialization,
and a representative .ts file is opened from each to trigger tsserver project
loading. This enables `find_referencing_symbols` and `request_references` to
return results from across package boundaries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-04 14:22:20 +02:00
Michael PanchenkoandClaude Opus 4.7 024d31ba22 fix(lsp): omit optional Content-Type header from outgoing messages (#1442)
Per the LSP spec, Content-Type is optional and defaults to
application/vscode-jsonrpc; charset=utf-8 (the exact value we were
sending). Spec-compliant servers behave identically with or without it.

In practice some servers have stricter parsers. Notably, Godot's
GDScript LSP (LSPeer::handle_data in
modules/gdscript/language_server/gdscript_language_protocol.cpp)
extracts the body length via header.substr(16).to_int() and silently
drops messages that contain any header beyond Content-Length.

Sending only Content-Length is interoperable across the spec-compliant
servers we use today and unblocks Godot's LSP. Also tightens the type
signature of create_message from tuple[bytes, bytes, bytes] to
tuple[bytes, bytes] now that there is no Content-Type element.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 11:43:04 +02:00
Sam CarsonandMichael Panchenko 16d1a30397 hooks: extend auto-approve to Claude Code's auto permission mode (#1445)
* hooks: extend auto-approve to Claude Code's auto permission mode

Closes #1386

---------

Co-authored-by: Michael Panchenko <35432522+MischaPanch@users.noreply.github.com>
2026-05-04 11:27:09 +02:00
Dr. Dominik Jain c5a27ed9ec Merge pull request #1438 from oraios/fix_downloaded_dependency_versioning
Fix downloaded dependency versioning
2026-05-02 20:56:45 +02:00
Dominik Jain 3a0afadf47 Improve project creation/config docs 2026-05-02 20:53:20 +02:00
Michael Panchenko 90c4e78e54 LS: fix unversioned runtime dependency paths, keeping backwards compatibility 2026-05-02 10:05:57 +02:00
kurushimeeandClaude Opus 4.7 7aeb7bc482 fix(lsp): omit optional Content-Type header from outgoing messages
Per the LSP spec, Content-Type is optional and defaults to
application/vscode-jsonrpc; charset=utf-8 (the exact value we were
sending). Spec-compliant servers behave identically with or without it.

In practice some servers have stricter parsers. Notably, Godot's
GDScript LSP (LSPeer::handle_data in
modules/gdscript/language_server/gdscript_language_protocol.cpp)
extracts the body length via header.substr(16).to_int() and silently
drops messages that contain any header beyond Content-Length.

Sending only Content-Length is interoperable across the spec-compliant
servers we use today and unblocks Godot's LSP. Also tightens the type
signature of create_message from tuple[bytes, bytes, bytes] to
tuple[bytes, bytes] now that there is no Content-Type element.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 20:53:05 +07:00
Dominik Jain 30ee9235fa Update TestSerenaAgent.test_find_declaration_error 2026-04-30 21:10:53 +02:00
Dr. Dominik Jain d9d49fae7d Merge pull request #1433 from oraios/features/diagnostics_and_ls_extensions
Features: diagnostics and LS extensions
2026-04-30 18:26:23 +02:00
Dominik Jain 90d6f2cde8 Merge remote-tracking branch 'origin/main' into features/diagnostics_and_ls_extensions
Conflicts:
	CHANGELOG.md
2026-04-30 18:25:22 +02:00
Dominik Jain 4f0c3f83e3 Update change log and README to consider new diagnostics/declaration/implementations tools 2026-04-30 15:31:27 +02:00
Dominik Jain 2e0167f818 Refactor LSP tools for symbol declaration retrieval
* Apply common functionality already used in JetBrainsFindDeclarationTool
* Remove location-based tool (counteracts Serena's principle to eschew line numbers)
* Apply renaming to use "find declaration" instead of "find defining symbol"
2026-04-30 15:31:27 +02:00
Dominik Jain 371d70f87e Refactoring: Introduce abstraction GroupedDiagnostics, removing duplication 2026-04-30 15:31:27 +02:00
Dominik Jain 5ab912ca0b CodeEditor: Remove unused management of edited files
Management was unnecessarily introduced by AI in 133e1be2a780ee875a9b7d739e076b85d81b29fd
2026-04-30 15:31:27 +02:00
Dominik Jain 061020ce22 Refactor EditingToolWithDiagnostics
* Add context manager to simplify usage, improving output handling
* Add util module ls_diagnostics, reifying DiagnosticsDiff
2026-04-30 15:31:27 +02:00
Dominik Jain 15858e6cd9 Refactoring: Introduce base class EditingToolWithDiagnostics 2026-04-29 23:52:26 +02:00
Michael Panchenko da59a19c50 Fixes in various LS and in tests to accommodate diagnostics edge behavior
Also minor fix in go test expectations of symbol name
2026-04-29 23:52:26 +02:00
Michael Panchenko bd7e64e85a Fixed diagnostics files uri handling, added low-level tests 2026-04-29 23:52:26 +02:00
Michael Panchenko d198d67a9f Added JetBrains diagnostics tools, WIP 2026-04-29 23:52:26 +02:00
Michael Panchenko 940bbb31de Restructured serena_agent tests, reifying the cases
Removed some cases (haxe, msl) during cherry pick due to conflicts. We don't need to cover these languages in this test
2026-04-29 23:52:26 +02:00
Michael Panchenko c55e0c900e Diagnostics, implementation and definition tools (WIP) 2026-04-29 23:52:26 +02:00
Dr. Dominik Jain 4ce53eca11 Merge pull request #1437 from oraios/feature/added-modes
Revamp mode configuration
2026-04-29 19:14:23 +02:00
Dominik Jain dc491db2d4 Improve comment on web_dashboard_open_on_launch 2026-04-29 19:12:34 +02:00
Dominik Jain 4991b025a5 Update project.yml 2026-04-29 18:10:52 +02:00
Dominik Jain b9996cd663 Update language list (based on scripts/print_language_list.py) 2026-04-29 18:05:38 +02:00
Dominik Jain 1184a9b5bd Remove outdated list of tools, add link to tool list instead 2026-04-29 18:05:38 +02:00
Dominik Jain dfe1c3d7d1 Revamp mode selection
* Breaking change: Projects (project.yml) can no longer override `base_modes`.
   Instead, they can define `added_modes` to add modes on top of base and default modes.
   This allows `base_modes` to be fully applied for the computation of the base toolset
   as they are no longer dynamic.
 * Serena's default configuration now uses `interactive` and `editing` as `base_modes`
   instead of as `default_modes`.
2026-04-29 18:05:38 +02:00
Robin Jehn 37c837ffd3 Send languageId 'typescriptreact' / 'javascriptreact' for .tsx / .jsx files (#1436)
* Fix: send languageId 'typescriptreact' / 'javascriptreact' for .tsx / .jsx

Without this, .tsx files are opened with languageId 'typescript', so
tsserver parses JSX as syntax errors and recovers by truncating the
enclosing symbol's range at the first multi-line JSX expression. The
resulting symptoms:

- find_symbol(name, include_body=True) on a React component returns a
  body that ends mid-component, hiding everything below.
- The same component shows up as multiple Method-kind symbols (one per
  call site) plus a separately-tracked Constant for the definition,
  because tsserver mistakes JSX-tag tokens for member access.

Reproducer (before fix, real-world TSX file):
  SidebarPDF range = [11:1-25:207]   (truncated at first JSX, line 25)
After fix:
  SidebarPDF range = [11:1-281:2]    (full body)

The base SolidLanguageServer._get_language_id_for_file is explicitly
designed for this — its docstring says "Override in subclasses to
return file-specific language IDs." This change just exercises that
hook for the React file extensions.

Adds a regression test + jsx_component.tsx fixture covering the same
arrow-function-with-multi-line-JSX-ternary pattern that triggers the
truncation in real codebases (see oraios/serena#1029 for an earlier
report whose root cause was not identified).
2026-04-29 18:03:41 +02:00
Dominik Jain 28c2866bf4 SolidLanguageServer: Improve docstrings [skip ci] 2026-04-29 16:31:25 +02:00
Dominik Jain 842d5b9374 Mode jetbrains: Improve prompt, fixing typo [skip ci] 2026-04-29 16:31:25 +02:00
Dominik Jain 68300e94ac RestartLanguageServerTool: Improve docstring 2026-04-29 16:31:25 +02:00
Michael Panchenko c79e9d65f2 Update header text in README.md [ci skip] 2026-04-29 14:33:02 +02:00
Michael Panchenko 6dfda8c99e Fix: Skip broken links in _iter_gitignore_files #1435 2026-04-29 12:14:12 +02:00
Michael Panchenko df0f476614 LS: mark LS that support implementation request 2026-04-28 12:17:18 +02:00
Michael Panchenko 5dd1a41000 Changelog [ci skip] 2026-04-28 09:33:13 +02:00
a-simeshin a3565ef60e Merge pull request #1415 from a-simeshin/feat/jdtls-path-override
Allows setting paths for JDTLS and Lombok, thus allowing using Serena with JDTLS without forcing downloads
2026-04-28 09:31:53 +02:00
Michael Panchenko 3a8393bcaf Tests: removed some unnecessary hook tests 2026-04-28 09:26:26 +02:00
Michael Panchenko ff78c1bee6 Improve cpp log level classification (#1422) 2026-04-28 09:19:47 +02:00
Dominik Jain 0a96f71bd9 Release v1.2.0 2026-04-27 13:36:19 +02:00
Dominik Jain 4e0043a9b8 Merge branch 'dev-v1.2.0' 2026-04-27 13:35:18 +02:00
Dominik Jain 7c50041d14 Improve Claude Code client setup documentation 2026-04-27 13:35:06 +02:00
Dominik Jain d9864bcdc0 Update news for 1.2.0 2026-04-27 13:16:20 +02:00
Michael Panchenko c68137e4d4 Adjusted wording of startup hook, improving project activation instructions #1401 2026-04-27 13:13:54 +02:00
Dominik Jain 96303c5381 Merge branch 'make_claude_code_great_again' into dev-v1.2.0 2026-04-27 12:58:53 +02:00
Rabbit_SlayerandMichael Panchenko fd3e29ac50 Skip and warn on malformed project configs at startup instead of crashing the MCP server (#1424)
* Skip and warn on malformed project configs at startup

`SerenaConfig.from_config_file` iterates the `projects:` list in
`serena_config.yml` and calls `ProjectConfig.load(path)` with no
exception handling. A single malformed `.serena/project.yml`
(missing required key, bad language string, YAML syntax error,
etc.) raises out of the master loader and aborts MCP server
startup before any client handshake or tool registration. Other
projects in the list — even ones that would load cleanly — become
unreachable.

This matches the failure mode behind #997: the schema-migration
shim closed the *cause*, but the surrounding loader still has no
isolation, so the next class of `project.yml` malformation will
take the server down again.

Wrap the `ProjectConfig.load(path)` call in the master loop with
a narrow try/except that logs a warning and continues, matching
the existing skip-with-warning pattern used a few lines above for
inaccessible paths and missing project.yml files. One bad project
becomes one skipped project, not a server-down event.

A new test under `TestSerenaConfigFromConfigFileRobustness`
registers two projects (one healthy, one with invalid YAML),
asserts that `from_config_file` returns successfully, that only
the healthy project ends up registered, and that a warning naming
the bad path is logged.

---------

Co-authored-by: Michael Panchenko <35432522+MischaPanch@users.noreply.github.com>
2026-04-27 12:39:34 +02:00