Commit Graph
3257 Commits
Author SHA1 Message Date
Dominik Jain b2de2c8f97 Improve instructions on prompt templates, adding link to new docs section
Improve other docstrings in templates and add missing key `fixed_tools`
2026-08-08 21:50:13 +02:00
Dominik Jain c9fa15741e Add documentation on prompt templating in Serena 2026-08-08 17:57:21 +02:00
Dominik Jain 69d14891ca Minor refactoring: Rename _format_prompt to _render_prompt, adding docstring 2026-08-08 17:48:37 +02:00
Dominik Jain bb06ed05dd Support embed_memory function in prompt templates
Apply it in Serena's own project prompt
2026-08-08 17:43:13 +02:00
Dominik Jain 91ebba1c8c Merge remote-tracking branch 'origin/Main' into memory-cleanup 2026-08-08 17:18:05 +02:00
Dominik Jain ed401769b5 ProjectServer: Use general headless mode config overrides 2026-08-08 16:57:40 +02:00
Dr. Dominik Jain f90d488309 Merge pull request #1828 from oraios/prompt-tags 2026-08-08 16:53:39 +02:00
Dominik Jain d3a8e9b565 Improve project activation message 2026-08-08 16:49:42 +02:00
Dominik Jain 548aea28a6 Allow project initial prompt & newly activated dynamic mode prompts to use templating/variables
Add helper method _format_prompt_tag
2026-08-08 16:47:03 +02:00
Dominik Jain 0968bae6eb Enclose sub-prompts in tags 2026-08-08 16:43:46 +02:00
Tyce Herrman 7acd78bde0 ci: exclude JDTLS workspaces from cache 2026-08-08 16:32:17 +02:00
Merlin Hughes 600d3b2fad Scala: answer Metals' build-import prompt (#1769)
* scala: answer Metals' build-import prompt

Metals asks, via window/showMessageRequest, whether to import a workspace it
has not seen before. Serena registered no handler, so the request came back
`method 'window/showMessageRequest' not handled on client` and Metals logged
"Unexpected error initializing server" and gave up. No build server, no build
target, and every cross-file query answered by the fallback presentation
compiler — which cannot see past the file it is given.

A client cannot decline the question instead: Metals' `disableShowMessageRequest`
is server-side configuration, and its no-op fallback answers "Not now", which
imports nothing either. Answering is the only route to a build.

So answer the three prompts that lead to a build server, and dismiss anything
else with `null` — a prompt we do not recognise is one whose consequences we
cannot judge, and two of Metals' others offer to kill a process and to open a
window. "Don't show again" is never chosen; Metals persists that in the
project's own state.

Since answering yes lets Metals run the project's build tool,
`ls_specific_settings.scala.auto_import_build: false` declines instead.

* scala: name the build-tool choice as a gap, and test the setting

`Messages.ChooseBuildTool` ("Multiple build definitions found. Which would
you like to use?") offers the build tools' own executable names, and precedes
the import prompt wherever a workspace holds more than one kind of build. It
is dismissed like anything else unrecognised, so such a workspace is still
not imported — a deliberate choice, since picking one is a guess of a
different order, but one the comment and the setup guide should admit to
rather than claim every prompt on the path is answered.

Also: cover the route from `ls_specific_settings` to `auto_import_build`,
which nothing exercised, and correct the `ImportBuildChanges` message in the
fixtures, which had the notification variant's trailing full stop rather than
the request's own text.
2026-08-08 16:28:04 +02:00
Tyce HerrmanandDominik Jain 217517ecdf feat(kotlin): update language server to 262.9593.0 (#1811)
* feat(kotlin): update language server to 262.9593.0

Note: download URL structure differs depending on version

---------

Co-authored-by: Dominik Jain <dominik.jain@oraios-ai.de>
2026-08-08 16:25:13 +02:00
Tyce Herrman 8364fc5548 fix(java): remove unused IntelliCode integration 2026-08-08 16:19:31 +02:00
yhheolab-oss 5a06cec7d0 Merge pull request #1820 from yhheolab-oss/fix/project-server-active-project-race
fix(project_server): serialize access to the process-wide active project
2026-08-08 16:15:30 +02:00
Dominik Jain 07d49be110 Clean up memories and move system prompt info to critical_info memory 2026-08-08 13:35:19 +02:00
Dominik Jain 52c3165d1d Add more concrete instructions on test strategy in system prompt 2026-08-08 13:05:09 +02:00
Dominik Jain c7af2c09ef SerenaDashboardTrayManager: Configure trusted hosts (local hosts only) 2026-08-05 21:36:03 +02:00
Dominik Jain df24c3151f Clarify responsibilities when exposing network services 2026-08-05 21:31:59 +02:00
Dominik Jain 7aa24b8dad ProjectServer: Configure trusted hosts for localhost case 2026-08-05 21:28:17 +02:00
Dr. Dominik Jain 9558366327 Merge pull request #1808 from rr-develop/fix/kotlin-ls-refresh-request-handlers 2026-08-05 13:50:53 +02:00
arimu1andDominik Jain c657e26d36 Change default SolidLSP request timeout to 300s
SolidLanguageServer.create previously defaulted timeout=None, so Request
waits were unbounded. Test construction never set a timeout; a wedged
language server (intermittent ccls hang during indexing) could stall CI
until the job cap.

Default create to DEFAULT_LS_REQUEST_TIMEOUT (300s). Explicit timeout=None
still opts out. Project continues to pass ls_timeout from tool_timeout.

Resolves #1717

Co-authored-by: Dominik Jain <dominik.jain@oraios-ai.de>
2026-08-05 13:48:34 +02:00
Dr. Dominik Jain df5ab4f607 Merge pull request #1781 from oraios/test-uv-python-compat
Test Python version compatibility in CI
2026-08-05 12:00:32 +02:00
Dr. Dominik Jain e2a344a8da Merge pull request #1791 from caost/fix/macos-tray-dock-icon 2026-08-05 11:51:48 +02:00
Dominik Jain 16692df979 Use TRAY_MANAGER as new default dashboard interface on macOS 2026-08-05 11:51:13 +02:00
caostandClaude Opus 5 89c83efc4f Fix: macOS tray manager showed a Dock icon
The tray manager creates the shared NSApplication so that pystray can
attach its status item to it, but it never sets an activation policy.
The default is NSApplicationActivationPolicyRegular, which makes the
process a regular app: a Python icon appears in the Dock and in the
app switcher even though the tray manager has no windows.

Set NSApplicationActivationPolicyAccessory instead, which is the
policy intended for menu-bar-only agents. Only the status item remains
visible.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 11:49:56 +02:00
Tyce Herrman 0498de4a52 fix: scope Syrupy diff patch to PyCharm 2026-08-05 11:46:54 +02:00
Tyce Herrman e03094f5bc fix(nix): use published diagnostics for nixd 2026-08-05 11:40:52 +02:00
Dominik Jain e6b3852117 More liberal handling of ignored paths in file access tools
- Tools that explicitly target a single file (`create_text_file`, `read_file`, `replace_content`) no longer
   consider ignored paths in general, i.e. all files can be accessed.
   When a path is explicitly accessed, we should not try to prevent it; the agent is assumed to have a good reason
    for doing so.
 - Tools that traverse a subtree of the project (`list_dir`, `find_file`, `search_for_pattern`) now all have an
   option `skip_ignored_files` (whether to skip ignored sub-paths).
   Note that if the base path is itself ignored, ignored paths cannot be considered.

Resolves #1805
2026-08-04 10:33:34 +02:00
Dr. Dominik Jain cd04838be9 Merge pull request #1804 from oraios/ls-notify-on-reopen-changed
Fix stale file state in language servers (with files kept open)
2026-08-03 22:22:23 +02:00
Dominik Jain 0720dd92e0 Merge remote-tracking branch 'origin/main' into ls-notify-on-reopen-changed
Conflicts:
	CHANGELOG.md
2026-08-03 22:21:48 +02:00
rr-develop d3293b2c63 fix(svelte): correct inlayHint refresh method name
`workspace/inlayHints/refresh` (plural) is not a method in the LSP
specification — the refresh request is `workspace/inlayHint/refresh`.
The handler could therefore never be invoked, so the request it was
meant to absorb would still be answered with `MethodNotFound`.
2026-08-03 11:07:15 +02:00
rr-develop bfa45a6a11 fix(kotlin): handle workspace refresh requests to prevent LS shutdown
The Kotlin language server client advertises `refreshSupport` for
codeLens, semanticTokens, inlineValue, inlayHint and diagnostics, but
registered no handler for the corresponding `workspace/*/refresh`
requests.

When the server sends one, `LanguageServerProcess._request_handler`
finds no handler and replies with `MethodNotFound`. The Kotlin LSP
treats that error as fatal and terminates, which surfaces as
`LanguageServerTerminatedException` and kills any in-flight tool call.

Register no-op handlers for all five advertised capabilities, mirroring
what `svelte_language_server` already does.
2026-08-03 11:02:06 +02:00
Ivan 29d07d4f6b fix(erlang): address functions by name/arity without the name path separator
Erlang LS identifies functions, types and parameterised macros as
`name/arity`, but `/` separates the components of a Serena name path, so
`create_user/4` was parsed as "symbol `4` nested inside `create_user`" and
could never match -- not even via the name path Serena itself reported for
the symbol. Browsing still worked, but find_referencing_symbols,
replace_symbol_body and insert_after_symbol were unusable on Erlang
functions.

Normalize the name to `create_user#4` instead. `#` cannot occur in an
unquoted Erlang atom, so it can never collide with a real name, unlike `@`.
The arity is kept rather than stripped because it is part of a function's
identity in Erlang: create_order/3 and create_order/2 are different
functions and may coexist in one module.

Also document the "no `/` in symbol names" rule on _normalize_symbol_name,
which is what the next backend for such a language needs to know.
2026-08-03 01:37:36 +02:00
Dominik Jain 9fc8033ece Introduce DownloadedDependency abstraction with URL-keyed hash database
* Add DownloadedDependency abstraction to facilitate handling of downloaded
  and hash-verified dependencies.
  In CI, missing hashes raise an exception.
  For users, unverified downloads log a warning.
* Add DownloadedDependencyHashDatabase which manages a URL-keyed database
  of sha256 hashes. It can be conveniently updated incrementally through a
  script (src/solidlsp/resources/downloaded_dependency_hashes.json),
  provided that language server implementations provide DownloadedDependency
  instances statically

Applied in EclipseJDTLS:
* Replace the untyped nested-dict runtime dependency descriptors with DownloadedDependency instances
* Move the JDTLS version-pinning constants into DependencyProvider
* Replace the platform dependency dicts with the VSCodeJavaConfig dataclass

Utils:
 * Add FileUtils.ArchiveType to type archive types that were previously plain str
 * Add is_running_in_ci() to ls_utils

Updated memory on adding a language server accordingly.
2026-08-03 01:34:24 +02:00
Dominik Jain 9eb4df2e7b Fix: Change the semantics of file opening (open_file) in the language server
Instead of sending only the didOpen notification if the file is not already open,
the method now ensures that the language server has the (current) contents of the file,
sending the didChange notification in cases where the file is already open but has changed
on disk. This better reflects the actual intention of calling the method.

This affects the Vue and Svelte language servers, which unlike all other server implementations,
kept files open, which could result in the servers reporting stale information in the
absence of update notifications (external file changes).
2026-08-02 13:11:04 +02:00
Dominik Jain e5c86a3422 request_document_symbols: Improve logging 2026-08-02 13:11:04 +02:00
Dominik Jain fc7a8ec732 Fix: LSPFileBuffer: a stale content hash could be returned if files are kept open
and file contents were not read before trying to retrieve the hash value
2026-08-02 13:11:03 +02:00
Dominik Jain d179e2ba59 Consistently configure the log level in tests 2026-08-02 13:11:03 +02:00
Amir Fathi 14fa2b001a Add test: find_symbol with file kept open in LS and external modification 2026-08-02 13:10:29 +02:00
Tyce Herrman c7dbe3bd11 ci: use Node 24 for Node-backed test batches 2026-08-01 16:14:38 +02:00
arimu1 f4ecb1a5bd fix(ls): re-raise LS termination from pull-diagnostics fallback
request_text_document_diagnostics swallowed all SolidLSPException from
textDocument/diagnostic and fell back to published diagnostics. When the
process had already died, that bypassed tools_base restart-and-retry and
silently returned empty diagnostics.

Re-raise when is_language_server_terminated(); keep the published-
diagnostics fallback for other pull-diagnostics failures.

Fixes #1770
2026-08-01 15:58:07 +02:00
Dominik Jain c958aa0235 Guard actions in __del__ (obj must be initialised) 2026-08-01 15:57:03 +02:00
Ivan c74373e29a Implement _create_base_initialize_params for ErlangLanguageServer
ErlangLanguageServer was left behind when the initialize-params refactor
moved server-specific capabilities into _create_base_initialize_params.
It still built its initialize dict inline in _start_server, so the class
never satisfied the abstract method declared on SolidLanguageServer and
could not be instantiated at all:

  Can't instantiate abstract class ErlangLanguageServer without an
  implementation for abstract method '_create_base_initialize_params'

Move the capabilities block into the required method, following the
pattern used by the other backends, and let _start_server build its
params via _create_initialize_params(). processId/rootPath/rootUri are
dropped from the literal since the builder supplies them.
2026-08-01 11:44:32 +02:00
Dominik Jain 97bc0980a2 Further improve docstring of find symbol tools 2026-07-31 16:06:02 +02:00
Dominik Jain a47df023f5 Report language server status in GetCurrentConfigTool result
Resolves #1782
2026-07-31 16:06:02 +02:00
Dr. Dominik Jain dd12fa032f Merge pull request #1779 from TyceHerrman/agent/rust-analyzer-lightweight
Rust: reduce rust-analyzer memory churn
2026-07-30 10:43:59 +02:00
Dominik Jain 7155dc596b Remove debug code
Fixes #1783
2026-07-30 10:15:31 +02:00
Dominik Jain 1f133f62cf Re-enable cargo.autoreload
autoreload=false was likely to leave project metadata stale after manifest or workspace changes #1779
2026-07-30 00:27:09 +02:00
Tyce Herrman 3ede3cbc33 Docs: use SessionEnd for Codex hook cleanup (#1733)
* Docs: use SessionEnd for Codex hook cleanup

* Docs: note legacy Codex Stop issue
2026-07-29 23:36:41 +02:00