Add structured non-source file types (.yaml, .json, .toml, .graphql,
.proto, .sql, .tf, .hcl, etc.) to the read-file nudge set.
These extensions are common in real-world projects and repeated raw
reads of them are equally well served by `search_for_pattern` or
other Serena tools — the same rationale that applies to .py/.ts already
applies to config, schema, and query files.
Note added to the docstring: `search_for_pattern` works regardless of
extension and is always a valid alternative to repeated raw reads.
The _is_ignored_relative_path method used to raise FileNotFoundError
when checking a path that does not exist on disk. This prevented
editing tools (replace_content, insert_after_symbol, etc.) from
operating on newly created files.
Since a non-existent file cannot be matched by ignore patterns,
returning False (not ignored) is semantically correct and safe.
Changes:
- _is_ignored_relative_path: return False instead of raising for
non-existent paths, with a debug log message
- validate_relative_path docstring: updated to reflect new behavior
- Added 3 test cases covering non-existent path scenarios
* constants.py should remain the central place where a root path
is determined based on source file location
* SerenaPaths should consistently use strings
Serena's file-to-language router already maps `.t` to the Perl LS
(`Language.PERL` in `solidlsp/ls_config.py`), but the
Perl::LanguageServer-side `fileFilter` was hardcoded to
`[".pm", ".pl"]`. As a result Perl::LanguageServer skipped `.t`
files entirely: symbol queries on a `.t` returned empty, and
references to `.pm`/`.pl` subs missed any callers defined in
`.t` files.
Add `.t` to the filter, deduplicate the two `fileFilter` literals
into a `_FILE_FILTER` class constant, and note the sync requirement
with `Language.PERL.get_source_fn_matcher()` in a comment. Cover
the behavior with a new cross-file references test plus a `helper.t`
fixture; the test fails on unpatched `main` and passes on this
branch.
fix(gdscript): detect broken TCP connection and fail fast on reconnect
When the Godot editor restarts or the LSP connection drops, the
TCPLanguageServer read loop exits but previously left self._sock set,
causing is_running() to return True. Subsequent LSP requests would
then send to a dead socket, log a broken-pipe error silently, and
block for the full tool timeout (235 s by default) before raising.
Two fixes in TCPLanguageServer:
- _send_payload: on OSError, clear self._sock/self._file and
immediately cancel all pending requests so callers fail fast
instead of waiting out the timeout.
- _read_loop: after unexpected exit, clear self._sock/self._file so
is_running() returns False and _ensure_functional_ls can trigger
an automatic reconnect on the next tool call.
Also fixes GodotLanguageServer so that ls_specific_settings.request_timeout
is respected as a cap on the per-request timeout. Previously the value
was read in _create_language_server_interface but then overridden by
the tool-timeout-derived value passed to set_request_timeout(). Now
set_request_timeout() applies min(incoming, configured) so users can
set a low request_timeout in their project.yml to fail fast without
lowering the global tool_timeout.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Combine DOTALL and MULTILINE into a single flag for "multi-line mode",
replacing the dotall parameter with multiline/regex_multiline
* Apply the parameter in SearchForPatternTool
* Remove the dotall flag from editing tools (ReplaceContentTool, EditMemoryTool)
because edits should always use multi-line mode, but keep the multiline parameter
as an option in ContentReplacer