From 27d4a4da281c37f043e72c68171d9fe1cd61fe57 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 4 Apr 2025 01:17:20 +0200 Subject: [PATCH 1/6] Change warning to info log --- src/serena/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serena/agent.py b/src/serena/agent.py index 66dba0fb..03869253 100644 --- a/src/serena/agent.py +++ b/src/serena/agent.py @@ -83,7 +83,7 @@ class SerenaAgent: else: log_level = project_config.get("gui_log_level", logging.INFO) if Logger.root.level > log_level: - warnings.warn(f"Root logger level is higher than GUI log level; changing the root logger level to {log_level}") + log.info(f"Root logger level is higher than GUI log level; changing the root logger level to {log_level}") Logger.root.setLevel(log_level) self._gui_log_handler = GuiLogViewerHandler(GuiLogViewer(title="Serena Logs"), level=log_level, format_string=LOG_FORMAT) Logger.root.addHandler(self._gui_log_handler) From cde92fc71d2d211241e95494417bd955cd33e8d4 Mon Sep 17 00:00:00 2001 From: Michael Panchenko <35432522+MischaPanch@users.noreply.github.com> Date: Fri, 4 Apr 2025 10:29:33 +0200 Subject: [PATCH 2/6] Readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89a59646..e0e7ab37 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ Here's how it works (see also [Agno's documentation](https://docs.agno.com/intro 2. Install serena with the optional requirements: ```shell # You can also only select agno,google or agno,anthropic instead of all-extras - uv pip install --all-extras -e . + uv pip install --all-extras -r pyproject.toml -e . ``` 3. Copy `.env.example` to `.env` and fill in the API keys for the provider(s) you From 96a26c795a6047997e1fe8a505b1c50dd74b2952 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 4 Apr 2025 10:49:23 +0200 Subject: [PATCH 3/6] Improve exception message in get_platform_id --- src/multilspy/multilspy_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/multilspy/multilspy_utils.py b/src/multilspy/multilspy_utils.py index 1e6ac618..f1dc8dc1 100644 --- a/src/multilspy/multilspy_utils.py +++ b/src/multilspy/multilspy_utils.py @@ -213,7 +213,7 @@ class PlatformUtils: platform_id += "-" + libc return PlatformId(platform_id) else: - raise MultilspyException("Unknown platform: " + system + " " + machine + " " + bitness) + raise MultilspyException(f"Unknown platform: {system=}, {machine=}, {bitness=}") @staticmethod def get_dotnet_version() -> DotnetVersion: From c2c1b5d24a6eb8ab7cdc5fab2eb9a73c61473a6f Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 4 Apr 2025 11:00:52 +0200 Subject: [PATCH 4/6] Add info on requirement for csharp --- myproject.demo.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/myproject.demo.yml b/myproject.demo.yml index b5272299..74c277dc 100644 --- a/myproject.demo.yml +++ b/myproject.demo.yml @@ -1,7 +1,11 @@ # absolute path to the project project_root: /path/to/project + # language of the project (csharp, python, rust, java, typescript, javascript, go, or ruby) +# Special requirements: +# * csharp: Requires the presence of a .sln file in the project folder. language: python + # list of directories to ignore: either names (e.g. "temp") or relative paths (e.g. "build/foo") ignored_dirs: [".git", "temp"] @@ -37,8 +41,6 @@ ignored_dirs: [".git", "temp"] # write_memory excluded_tools: [] - - # Whether to open a graphical window with Serena's logs (not supported on MacOS). # This is useful both for troubleshooting and for monitoring the tool calls, # especially when using the agno playground, since the tool calls are not always shown, @@ -49,5 +51,6 @@ excluded_tools: [] # previous instances. This leads to multiple log windows being opened, and only the last # window being updated. Since we can't control how agno or Claude Desktop starts Serena, we have to live with this limitation for now. gui_log_window: True + # minimum log level for the GUI log window (10 = debug, 20 = info, 30 = warning, 40 = error) gui_log_level: 20 From 33c993f8db1009fd700c99030f121ab746fbccaf Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 4 Apr 2025 11:01:15 +0200 Subject: [PATCH 5/6] C# language server: Account for spaces in path to .sln file Potentially fixes #21 --- src/multilspy/language_servers/omnisharp/omnisharp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/multilspy/language_servers/omnisharp/omnisharp.py b/src/multilspy/language_servers/omnisharp/omnisharp.py index 0f295a0c..d290af2a 100644 --- a/src/multilspy/language_servers/omnisharp/omnisharp.py +++ b/src/multilspy/language_servers/omnisharp/omnisharp.py @@ -77,7 +77,7 @@ class OmniSharp(LanguageServer): "ascii", "-z", "-s", - slnfilename, + f'"{slnfilename}"', "--hostPID", str(os.getpid()), "DotNet:enablePackageRestore=false", From 1c71b1e5d140d7dca3267bb48fc35a11307baf92 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 4 Apr 2025 11:02:42 +0200 Subject: [PATCH 6/6] Remove unused imports --- src/serena/agent.py | 1 - test/multilspy/test_basic.py | 1 - 2 files changed, 2 deletions(-) diff --git a/src/serena/agent.py b/src/serena/agent.py index 03869253..b98efaa6 100644 --- a/src/serena/agent.py +++ b/src/serena/agent.py @@ -8,7 +8,6 @@ import os import platform import sys import traceback -import warnings from abc import ABC from collections import defaultdict from collections.abc import Callable, Generator, Iterable, Iterator diff --git a/test/multilspy/test_basic.py b/test/multilspy/test_basic.py index e377a17c..a22c0fb1 100644 --- a/test/multilspy/test_basic.py +++ b/test/multilspy/test_basic.py @@ -6,7 +6,6 @@ like request_references using the test repository. """ import os -from pathlib import Path from multilspy.language_server import SyncLanguageServer from serena.text_utils import LineType