Commit Graph
206 Commits
Author SHA1 Message Date
Michael Panchenko e10d0552d9 Better error message on wrong entry of language 2025-04-24 14:37:15 +02:00
Michael Panchenko 102ed4ba1a Multilspy: fallbacks for missing values in retrieved symbols
Better error message on missing keys in overview method
2025-04-24 14:36:54 +02:00
Michael Panchenko 0a1d9b9d6f Multilspy: download clang executable if it's not there, better logging 2025-04-24 14:35:49 +02:00
Hill 1a63192082 Add file existence check and improve encoding handling in read_file method 2025-04-24 05:05:39 +00:00
Hill 5cb291f096 Use get() method for safer access to document root properties in LanguageServer 2025-04-24 05:04:12 +00:00
Dominik JainandGitHub da3ad9ad4d Merge pull request #82 from HillLiu/main
Add checks for 'location' and 'relativePath' in fix_relative_path function
2025-04-23 12:47:51 +02:00
Dominik Jain 3fbb7a152e Add robust way of determining machine architecture on Windows using a system call #18 2025-04-23 12:04:01 +02:00
Hill af35f48ac1 Add checks for 'location' and 'relativePath' in fix_relative_path function 2025-04-23 09:56:09 +00:00
Michael Panchenko e51cb768db Cleanup after ai 2025-04-22 17:32:45 +02:00
openhands 4d969844c8 Update iter_tool_classes to only iterate over tools in the same module by default 2025-04-22 15:13:20 +00:00
openhands 2737dd2b3f Use empty string instead of 'No description available' for missing descriptions 2025-04-22 14:18:30 +00:00
openhands f1b9b3bf3d Fix parsing of tools with missing docstring descriptions 2025-04-22 14:10:24 +00:00
sysradium 79fb28c54d fixup: add missing description to ListDir tool 2025-04-22 15:27:29 +02:00
Michael PanchenkoandGitHub 0ed4c12209 Merge pull request #73 from marcelomendoncasoares/param-descriptions
Parse parameter descriptions from docstring into MCP tool
2025-04-22 10:51:03 +02:00
Marcelo Soares b007917cf2 Refactor the docstring parse to use the docstring_parser lib 2025-04-21 21:44:20 -03:00
Marcelo Soares 51d0c76486 Add missing dependencies to run Dart LSP in Windows and MacOS 2025-04-21 09:25:53 -03:00
Marcelo Soares 46b7d79c81 Parse parameter descriptions from docstring into MCP tool 2025-04-21 09:05:30 -03:00
Michael Panchenko efb0690cf9 Minor cleanup after serena 2025-04-18 20:53:29 +02:00
Michael Panchenko 468beb8fb1 Add read-only mode with EditingTool marker class (entire change performed by Serena) 2025-04-18 20:33:46 +02:00
Michael Panchenko 2d4081ee39 Prompts 2025-04-18 20:10:01 +02:00
Michael Panchenko 5f8baf732d Make sure bodies and with newlines on symbol insertions 2025-04-18 19:34:12 +02:00
Michael Panchenko 0dbb809d25 Hotfix: off by one in symbol body 2025-04-18 18:54:27 +02:00
Michael Panchenko a7d3201d33 Missing annotation, minor 2025-04-17 11:51:29 +02:00
Michael Panchenko 30643228d0 Allow starting mcp as sse server, using click for args parsing 2025-04-17 11:48:46 +02:00
Michael PanchenkoandGitHub b2d10bedfb Merge pull request #61 from oraios/fix/ignored-path-handling
Fix handling of ignored paths
2025-04-16 20:54:07 +02:00
Dominik Jain 9e00803387 ListDirTool: Ignore files that are explicitly ignored by the user's configuration
(but skip the 'is source file' filter of the language server)
2025-04-16 20:50:23 +02:00
Dominik Jain b6f3843e9f Improve handling of fatal exceptions (as showing the GUI, even on the main thread, can fail),
making sure that the error is furthermore logged or at least written to stderr
2025-04-16 12:05:02 +02:00
Dominik Jain e3ed9c1067 Fix handling of ignored paths in ListDirTool:
Do not limit results to files not ignored by the LanguageServer,
but retain ignoring of ignored directories

Improve handling of ignored paths in LanguageServer:
  * Improve method naming:
     * should_always_ignore -> is_ignored_dirname
     * should_ignore_path -> is_ignored_path
  * Fix is_ignored_dirname (should_always_ignore) being applied to filenames
  * Add option ignore_unsupported_files to is_ignored_path to improve versatility
2025-04-16 11:40:34 +02:00
Michael Panchenko 36f0103fa2 Only import Gui things if Gui is enabled 2025-04-14 10:58:52 +02:00
Michael Panchenko 8c9fd747ef Updated agno, removed monkeypatch 2025-04-11 14:23:56 +02:00
Michael Panchenko 2c5460bb21 Merge branch 'refs/heads/main' into feature/tools-extension
# Conflicts:
#	CHANGELOG.md
#	src/multilspy/language_server.py
2025-04-10 20:33:56 +02:00
Michael Panchenko b6afe6d89d Use pathspec instead of fnmatch in search_file. Added tests for it
Also several small improvements
2025-04-10 20:26:44 +02:00
Dominik Jain ca4215c8a4 Fix CheckOnboardingPerformedTool:
* Tool description was incompatible with project change
  * Returned result was not as useful as it could be (now added list of memories)
2025-04-10 00:17:39 +02:00
Dominik Jain e12d8797c7 Add docstrings on timeout 2025-04-09 19:55:36 +02:00
Dominik Jain 1aaab5a7c2 Change relative path handling:
* Assign relativePath using PathUtils.get_relative_path, which returns None
    if no relative path exists (e.g. different drive);
    this aligns with how it was originally handled in multilspy
  * Adapt all places where we can now enounter None instead of a string
2025-04-09 19:54:04 +02:00
Michael Panchenko 74584cd9c7 Extended pattern search tool to also work on non-code files 2025-04-09 17:52:57 +02:00
Michael Panchenko dcc1b7d8f9 LS, refactoring: separate out search_files so it can be used outside of the LS 2025-04-09 17:32:32 +02:00
Dominik Jain f8ab7cd53c Handle filename matchers for new languages 2025-04-09 17:21:46 +02:00
Michael Panchenko ee90d2f4e8 New tool: restart_language_server 2025-04-09 14:43:00 +02:00
Dominik Jain c80cf59a59 Merge remote-tracking branch 'origin/main' into multilspy-update
Conflicts:
	src/multilspy/language_server.py
2025-04-08 20:26:32 +02:00
Dominik Jain 956d5b0c6f Updated multilspy sync commit identifiers (push) 2025-04-08 20:10:34 +02:00
Dominik Jain 90c42923c8 multilspy 43209c8521e93e8c41bdd2060800474fd0b9f8b1
commit 6c2565baababc9c978b7c1ab40a56fadef16c816
  Author: Developer <trane@trane-VirtualBox>
  Date:   Fri Apr 4 16:08:10 2025 +0530

      address review comments for clangd support

  src/multilspy/language_servers/clangd_language_server/clangd_language_server.py

  commit 78f1c2b43ee16bb29b222a1c1af77956d6fd906d
  Author: IDontHaveBrain <jonamjun.dev@gmail.com>
  Date:   Thu Apr 3 09:00:26 2025 +0900

      chore: Remove win-arm64 support from kotlin runtime dependencies

  src/multilspy/language_servers/kotlin_language_server/runtime_dependencies.json

  commit b907cc227a01f4a500d3445bfa17d7237f91c5ec
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Tue Apr 1 22:39:18 2025 +0900

      chore: use vscode-java runtime dependencies

  src/multilspy/language_servers/kotlin_language_server/kotlin_language_server.py
  src/multilspy/language_servers/kotlin_language_server/runtime_dependencies.json

  commit 3d19a282fe3d68d1a0b589c879775cac7ec23b8e
  Author: moz-mdauer <mdauer@mozilla.com>
  Date:   Tue Apr 1 13:56:45 2025 +0200

      feat: add support for workspace/symbol request

  src/multilspy/language_server.py
  src/multilspy/lsp_protocol_handler/lsp_constants.py

  commit e60081cbcac5b938ee8936f715478321c2be9b5c
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sat Mar 29 14:55:16 2025 +0900

      refactor: improve process termination handling

  src/multilspy/lsp_protocol_handler/server.py

  commit 88345e14e2172390b5f0d48d7877b2ee8620c187
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sat Mar 29 14:12:28 2025 +0900

      feat: add JDK runtime dependency

  src/multilspy/language_servers/kotlin_language_server/kotlin_language_server.py
  src/multilspy/language_servers/kotlin_language_server/runtime_dependencies.json

  commit ef9ad63083ebbbf929fd1cc4d0cc084e5cb69ad4
  Author: Andrej730 <azhilenkov@gmail.com>
  Date:   Sun Mar 23 19:26:08 2025 +0500

      Location.relativePath to use `None` value if relative path is not available #85

  src/multilspy/language_server.py
  src/multilspy/multilspy_types.py
  src/multilspy/multilspy_utils.py

  commit 85b1fe84140ec7bb84db843d618ea4bd8f4a096c
  Author: Huang YunKun <htynkn@gmail.com>
  Date:   Fri Mar 28 11:40:34 2025 +0800

      Update runtime_dependencies.json

  src/multilspy/language_servers/eclipse_jdtls/runtime_dependencies.json

  commit f0a42717cd95f9d7a845603cee60ac2fd22f16ac
  Author: Andrej730 <azhilenkov@gmail.com>
  Date:   Sun Mar 23 19:15:21 2025 +0500

      SyncLanguageServer.create - small documentation note

      To clarify that relative paths for repositories are not supported.

      Currently if it's using relative path, `create_server` fails with traceback similar to the one below:
      ```python
      Traceback (most recent call last):
        File "third_test.py", line 11, in <module>
          with lsp.start_server():
        File "\Python311\Lib\contextlib.py", line 137, in __enter__
          return next(self.gen)
                 ^^^^^^^^^^^^^^
        File "\Python311\Lib\site-packages\multilspy\language_server.py", line 744, in start_server
          asyncio.run_coroutine_threadsafe(ctx.__aenter__(), loop=self.loop).result()
        File "\Python311\Lib\concurrent\futures\_base.py", line 456, in result
          return self.__get_result()
                 ^^^^^^^^^^^^^^^^^^^
        File "\Python311\Lib\concurrent\futures\_base.py", line 401, in __get_result
          raise self._exception
        File "\Python311\Lib\contextlib.py", line 210, in __aenter__
          return await anext(self.gen)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "\Python311\Lib\site-packages\multilspy\language_servers\jedi_language_server\jedi_server.py", line 101, in start_server
          initialize_params = self._get_initialize_params(self.repository_root_path)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "\Python311\Lib\site-packages\multilspy\language_servers\jedi_language_server\jedi_server.py", line 50, in _get_initialize_params
          d["rootUri"] = pathlib.Path(repository_absolute_path).as_uri()
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "\Python311\Lib\pathlib.py", line 566, in as_uri
          raise ValueError("relative path can't be expressed as a file URI")
      ValueError: relative path can't be expressed as a file URI
      ```

  src/multilspy/language_server.py

  commit 9f69f75b1c9a460d63dbcc9d1b2b50596ee8a49b
  Author: Developer <trane@trane-VirtualBox>
  Date:   Tue Mar 18 18:54:18 2025 +0530

      clangd language server commit

  src/multilspy/language_server.py
  src/multilspy/language_servers/clangd_language_server/clangd_language_server.py
  src/multilspy/language_servers/clangd_language_server/initialize_params.json
  src/multilspy/language_servers/clangd_language_server/runtime_dependencies.json
  src/multilspy/multilspy_config.py

  commit edeb1771b8cd6064e6eca28a1126988780fc4608
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sun Mar 9 01:26:59 2025 +0900

      test: update Kotlin executable permissions and adjust Java version in workflow

  src/multilspy/language_servers/kotlin_language_server/kotlin_language_server.py

  commit 79a8f6902e91c0a1301c63b9f8737efbcbcccf24
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sun Mar 9 00:47:38 2025 +0900

      fix: improve process termination handling

  src/multilspy/language_servers/kotlin_language_server/kotlin_language_server.py
  src/multilspy/lsp_protocol_handler/server.py

  commit 90622f2788df412021565008dd83c27ac4d0b467
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sun Mar 9 00:10:28 2025 +0900

      fix: improve process termination handling

  src/multilspy/lsp_protocol_handler/server.py

  commit 907e6f340dec6b6e50c5712059bf3563fd7f064c
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sat Mar 8 23:52:07 2025 +0900

      fix: improve process termination handling

  src/multilspy/lsp_protocol_handler/server.py

  commit 694b30108ff3025b7f6f2e7923c6077f6b0dee23
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sat Mar 8 23:45:48 2025 +0900

      chore: cleanup

  src/multilspy/language_servers/kotlin_language_server/kotlin_language_server.py

  commit 635a6a83617e02a24c141a85b8dd8cabbf3a4601
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sat Mar 8 21:14:00 2025 +0900

      fix: platform check for Kotlin LSP from architecture-specific to OS-only

  src/multilspy/language_servers/kotlin_language_server/kotlin_language_server.py

  commit 2b053ee8b1f8b8d2ff391110baf27bb21163b715
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sat Mar 8 20:25:05 2025 +0900

      feat: Update Kotlin Language Server configuration and runtime dependencies

  src/multilspy/language_servers/kotlin_language_server/initialize_params.json
  src/multilspy/language_servers/kotlin_language_server/kotlin_language_server.py
  src/multilspy/language_servers/kotlin_language_server/runtime_dependencies.json

  commit 59f84082b9cd64e64bfc9a7644a644fdb8cc881e
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sat Mar 8 17:51:18 2025 +0900

      feat: Add Kotlin language server support

  src/multilspy/language_server.py
  src/multilspy/language_servers/kotlin_language_server/initialize_params.json
  src/multilspy/language_servers/kotlin_language_server/kotlin_language_server.py
  src/multilspy/language_servers/kotlin_language_server/runtime_dependencies.json
  src/multilspy/multilspy_config.py

  commit c85e2825aaa85d64611e7bfb392daa6eb7aa54ac
  Author: Jet Zhou <jet@jetzhou.com>
  Date:   Thu Mar 6 16:10:28 2025 -0800

      Add `start_independent_lsp_process` configuration option to `MultilspyConfig`

      Default value is `True`, which means language server process will be in
      its own process group. SIGINT and SIGTERM will only be received by the
      `multilspy` python process itself, not propagated. We rely on the
      existing `shutdown` and `stop` code to clean up the process.

      If set to `False`, the language server process will be under the same
      process group as the `multilspy` python process. This means SIGINT and
      SIGTERM will be received by both processes. This may cause issues if the
      python process has clean up code that runs after receiving
      SIGINT/SIGTERM because the `start_server` context manager will begin
      running its cleanup code, part of which invokes the `shutdown` and
      `stop` in `language_protocol_handler.server`. This will hang forever
      while awaiting an response from the language server process, since it
      would have already terminated itself after receiving SIGINT/SIGTERM.

  src/multilspy/language_server.py
  src/multilspy/lsp_protocol_handler/server.py
  src/multilspy/multilspy_config.py

  commit ff17f9365f4862627f00c43f8f88cd7a76f10fc6
  Author: Jet Zhou <jet@jetzhou.com>
  Date:   Tue Mar 4 22:27:55 2025 -0800

      Let language server subprocess be its own process group

      In situations where `multilspy` is launched from another process, a
      SIGINT or SIGTERM signal will be received by both the launching process
      as well as the process running the language server because
      `asyncio.create_subprocess_shell` defaults to `start_new_session=False`.
      In such a situation, `lsp_protocol_handler.server.shutdown` will be
      called but will hang since the underlying process is already terminated,
      `lsp_protocol_handler.server` won't ever receive an answer back for
      `shutdown`.

      This change makes it so that SIGINT and SIGTERM won't propagate to the
      language server process. We rely on the clean up code already in place
      to shut down the process as desired.

      See
      [python documentation](https://docs.python.org/3.13/library/subprocess.html#subprocess.Popen)
      for more details on `start_new_session`

  src/multilspy/lsp_protocol_handler/server.py

  commit ee104b062d1e0fda4a063937f5ca6488ac42683e
  Author: Jet Zhou <jet@jetzhou.com>
  Date:   Mon Mar 3 18:08:27 2025 -0800

      Add assertion string to `references` and `document_symbol` requests to language server

      These endpoints could return `None` in case the symbol is one that's not
      found. Adding the assertion string can help caller catch these
      exceptions and handle the errors as appropriate.

  src/multilspy/language_server.py

  commit 2edff10b31585fbcd5829afc07d1258b3b83b7c8
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sun Mar 2 12:49:34 2025 +0900

      refactor: Change to use `PlatformUtils` instead of `sys.platform`

  src/multilspy/language_servers/typescript_language_server/typescript_language_server.py

  commit e2cc4dd5f54adf89a2e4e8140387fc71fd5ebc56
  Author: v4rgas <66626747+v4rgas@users.noreply.github.com>
  Date:   Sat Mar 1 20:25:38 2025 -0300

      feat: add initialization options for Dart Language Server

  src/multilspy/language_servers/dart_language_server/initialize_params.json

  commit 807ec41b1098a2aecccbbe074f80d8c2dbd15d5d
  Author: v4rgas <66626747+v4rgas@users.noreply.github.com>
  Date:   Sat Mar 1 20:15:38 2025 -0300

      fix: update description for Dart Language Server runtime dependencies

  src/multilspy/language_servers/dart_language_server/runtime_dependencies.json

  commit ca5e3e91e7093838f3cc33ef5fb5561fdf9cf7ee
  Author: v4rgas <66626747+v4rgas@users.noreply.github.com>
  Date:   Sat Mar 1 20:12:53 2025 -0300

      feat: implement Dart Language Server runtime dependency setup

  src/multilspy/language_servers/dart_language_server/dart_language_server.py
  src/multilspy/language_servers/dart_language_server/runtime_dependencies.json

  commit 6295dd19db279033e2507dd665bd5c7df79e2623
  Author: nj.jo <jonamjun.dev@gmail.com>
  Date:   Sat Mar 1 15:18:41 2025 +0900

      fix: resolve 'No module named pwd' error on Windows

  src/multilspy/language_servers/typescript_language_server/typescript_language_server.py

  commit 2390a21479553e2b42e06eb10049d5c09ab9ef0a
  Author: v4rgas <66626747+v4rgas@users.noreply.github.com>
  Date:   Fri Feb 28 09:54:58 2025 -0300

      fix race codnition in process termination

  src/multilspy/lsp_protocol_handler/server.py

  commit e193501fb605ba86d52513f9fe044c2576bfc4cd
  Author: v4rgas <66626747+v4rgas@users.noreply.github.com>
  Date:   Thu Feb 27 22:05:03 2025 -0300

      feat: add Dart language support and corresponding tests

  src/multilspy/language_server.py
  src/multilspy/language_servers/dart_language_server/dart_language_server.py
  src/multilspy/language_servers/dart_language_server/initialize_params.json
  src/multilspy/multilspy_config.py

  commit 11c0da5450d0ce032b5ea832561e87ead6a0ca5b
  Author: v4rgas <66626747+v4rgas@users.noreply.github.com>
  Date:   Thu Feb 27 21:43:32 2025 -0300

      Add psutil dependency and enhance process termination handling

  src/multilspy/lsp_protocol_handler/server.py

  commit 7b85f39636e1971b0e9e0b9e69f4f8d7be51f931
  Author: v4rgas <66626747+v4rgas@users.noreply.github.com>
  Date:   Thu Feb 27 09:25:02 2025 -0300

      chore: undo styling changes

  src/multilspy/language_server.py

  commit 0d567618dda795c0789b374667c0325c3df4c87e
  Author: Jet Zhou <jet@jetzhou.com>
  Date:   Tue Feb 11 17:55:35 2025 -0800

      Force `npm i` to use current directory, in case some parent directory already contains a node_modules folder

  src/multilspy/language_servers/typescript_language_server/runtime_dependencies.json
2025-04-08 20:10:34 +02:00
Michael Panchenko 5d3e973ea8 Merged the overview tools into a single tool 2025-04-08 15:39:19 +02:00
Michael Panchenko 664d959eb8 LS: small utility method request_overview 2025-04-08 15:38:46 +02:00
Michael Panchenko a6fd83f829 LS: fix isfile check (was on relative path) 2025-04-08 15:10:52 +02:00
Michael Panchenko 787d158460 Disable GUI by default (again)
See https://github.com/oraios/serena/issues/39
2025-04-08 14:19:50 +02:00
Dominik Jain 87134b6ba0 Updated multilspy sync commit identifiers (pull) 2025-04-08 01:43:53 +02:00
Dominik Jain e766d55fd5 Add repo sync commit ids 2025-04-08 01:42:26 +02:00
Dominik Jain 50fb559c7c Extend the set of file extensions used for Python, JS, TS 2025-04-08 00:52:00 +02:00
Dominik Jain b0884bb1fd Improve error reporting 2025-04-08 00:44:30 +02:00