Commit Graph

821 Commits

Author SHA1 Message Date
Michael Panchenko 3d4dba77bd Formatting, minor ruff fixes 2025-06-28 23:42:44 +02:00
Michael Panchenko 6e2ed3969d Fixed urls in C# runtime_dependencies.json 2025-06-28 23:42:44 +02:00
Michael Panchenko 22372a30fa Removed pytest ini (all pytest config should happen in pyproject.toml)
Added csharp to markers
2025-06-28 23:42:44 +02:00
Claude Assistant 5c151ad1c4 PR comments 2025-06-28 23:42:44 +02:00
Claude Assistant 27eecb605a Fix JSON syntax error in initialize_params.json
Removes extraneous EOF marker that was causing JSON parsing to fail
during C# language server initialization parameter loading.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 23:42:44 +02:00
Claude Assistant 83e16782e7 Fix JSON syntax error in runtime_dependencies.json
Removes extraneous EOF marker that was causing JSON parsing to fail
during C# language server initialization.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 23:42:44 +02:00
Claude Assistant c007d5334d Add initialize_params.json for C# language server
Creates consistent initialization structure with other language servers:
- Extracts hardcoded initialization parameters to JSON configuration
- Uses template variables ($rootPath, $rootUri, $rootName) for dynamic values
- Maintains all existing capabilities and functionality
- Follows the established pattern used by 10/12 other language servers

This improves maintainability by allowing initialization parameter
modifications without code changes and ensures consistency across
all language server implementations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 23:42:44 +02:00
Claude Assistant ebe5782c6b Add runtime_dependencies.json for C# language server
Creates consistent configuration structure with other language servers:
- Extracts hardcoded URLs/versions to JSON configuration
- Supports both .NET runtime and language server packages
- Maintains platform-specific package handling
- Keeps NuGet source configuration centralized

This improves maintainability and follows the established pattern
used by all other language server implementations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 23:42:44 +02:00
Claude Assistant 07118e6fd6 Move serena.sln to C# test resources directory
Relocates the solution file to test/resources/repos/csharp/
to organize C# test assets and keep the root directory clean.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 23:42:44 +02:00
Claude Assistant 941927c564 Remove unnecessary __init__.py from csharp_language_server
Other language servers don't have __init__.py files, keeping
the structure consistent across language server implementations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 23:42:44 +02:00
Claude Assistant 5b87038227 Fix C# language server configuration enum parsing errors
Replace numeric enum values with proper string values for:
- dotnet_member_insertion_location: "with_other_members_of_the_same_kind"
- dotnet_property_generation_behavior: "prefer_throwing_properties"

This resolves ImplementTypeInsertionBehavior and ImplementTypePropertyGenerationBehavior parsing failures.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-26 00:04:45 +01:00
Claude Assistant 6a9e0e97f4 Revert "Add .editorconfig to fix C# language server configuration warnings"
This reverts commit 17dbe4a595.
2025-06-26 00:03:52 +01:00
Claude Assistant 17dbe4a595 Add .editorconfig to fix C# language server configuration warnings
Resolves parsing errors for dotnet_member_insertion_location and
dotnet_property_generation_behavior by providing proper enum values
instead of numeric strings.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-26 00:03:02 +01:00
Claude Assistant a72d3b7db0 Fix workspace configuration handling for C# language server
The language server was failing to parse empty objects '{}' for configuration
values. Updated the workspace/configuration handler to return proper default
values based on the configuration section:

- Boolean settings (enable/show/suppress/navigate) default to False
- Scope settings (analyzer/compiler diagnostics) default to "openFiles"
- Tab width and indent size default to 4
- Insert final newline defaults to True
- Other settings return null

This eliminates the "Failed to parse '{}' to type" errors during initialization.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 23:57:53 +01:00
Claude Assistant 39276c327d Add client/registerCapability handler for C# language server
Microsoft.CodeAnalysis.LanguageServer attempts to call client/registerCapability
during initialization, which was causing errors and shutting down the server.
Added a handler that acknowledges these requests to prevent the error.

This fixes the "method 'client/registerCapability' not handled on client" error
that was causing the language server to shut down during indexing.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 23:53:43 +01:00
Claude Assistant 723b7cb175 Fix C# language server startup and test configuration
- Add required --stdio flag for Microsoft.CodeAnalysis.LanguageServer
- Add required --extensionLogDirectory parameter to avoid startup failure
- Fix test fixture to properly start/stop language server
- Remove skip markers from C# tests to enable testing
- Return cache_dir from setup_runtime_dependencies for log directory creation

The language server now starts successfully and the first test passes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 23:49:54 +01:00
Claude Assistant aa0fb79208 Fix C# language server initialization timeout
Remove incorrect shlex.quote() usage in command construction. The ProcessLaunchInfo
expects a simple string command, not shell-quoted arguments. This was causing the
dotnet runtime to receive literal quotes around arguments, preventing proper
execution of the language server DLL.

The fix changes from:
  cmd = " ".join(shlex.quote(part) for part in cmd_parts)
to:
  cmd = " ".join(cmd_parts)

This allows the language server to initialize correctly without timeout errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 23:29:56 +01:00
Claude Assistant a4a0b73898 feat: Enhanced logging for C# language server indexing visibility
- Add console output for progress notifications (print to stdout)
- Add console output for important server messages (errors, warnings, info)
- Show progress percentages every 10% to avoid spam
- Add messages indicating indexing has started and may take time
- Add debug logging for raw progress notifications

This should make it clear that indexing is happening and not hanging.
2025-06-25 23:24:12 +01:00
Claude Assistant 2a77363cdf chore: Remove and gitignore C# build artifacts
- Delete obj/ and bin/ directories from test project
- Add .gitignore for C# test project to exclude build artifacts
- Prevents committing build files, temporary files, and NuGet packages
2025-06-25 23:21:41 +01:00
Claude Assistant da92b60af0 chore: Add .claude/settings.local.json to .gitignore
- Remove tracked .claude/settings.local.json file
- Add to .gitignore to prevent future commits of local settings
- Local Claude settings should not be in version control
2025-06-25 23:20:10 +01:00
Claude Assistant f93ace8abd fix: Fix C# language server initialization timeout
- Use shlex.quote() for proper shell escaping instead of array
- ProcessLaunchInfo expects a string command, not an array
- Add better error handling with specific error messages
- Add debug logging for the actual command being executed

This fixes the Empty queue error during language server initialization.
2025-06-25 23:18:05 +01:00
Claude Assistant 790eadfc91 feat: Add progress reporting for C# language server indexing
- Implement handle_progress function to display indexing progress
- Add window/workDoneProgress/create request handler
- Enable workDoneProgress capability in both window and workspace
- Replace do_nothing handler with proper progress notifications

This should display progress messages during C# project indexing instead of appearing to hang.
2025-06-25 23:15:31 +01:00
Claude Assistant c975ceb1d6 fix: Address immediate code review issues in C# language server
- Fix command injection vulnerability by passing cmd_parts array directly to ProcessLaunchInfo
- Update docstring to correctly reference Microsoft.CodeAnalysis.LanguageServer
- Remove string concatenation for shell commands to prevent injection attacks

These changes address the high-priority security and documentation issues identified in code review.
2025-06-25 23:13:31 +01:00
Claude Assistant 20ddf17b78 feat: Add automatic .NET 9 runtime download to C# language server
- Implement _ensure_dotnet_runtime method to check for and download .NET 9
- Support platform-specific runtime downloads (win-x64, linux-x64, osx-x64, osx-arm64)
- Cache downloaded runtime in ~/.cache/serena/language-servers/csharp/
- Modified setup_runtime_dependencies to return tuple of (dotnet_path, dll_path)
- Automatically use system .NET 9 if available, otherwise download

This ensures the C# language server can run even without .NET 9 pre-installed.
2025-06-25 23:02:27 +01:00
Claude Assistant 57e30aec57 Replace OmniSharp with Microsoft.CodeAnalysis.LanguageServer
- Implemented new CSharpLanguageServer class using Microsoft's official C# language server
- Downloads Microsoft.CodeAnalysis.LanguageServer NuGet package (requires .NET 9)
- Supports direct download from NuGet API with fallback to package managers
- Uses platform-specific runtime packages (linux-x64, win-x64, osx-x64, etc.)
- Caches downloaded language server in ~/.cache/serena/language-servers/csharp/
- Added basic tests for C# language server functionality
- Updated SolidLanguageServer.create to use new implementation
- Removed old OmniSharp implementation

Note: Full language server tests are skipped as they require .NET 9 runtime
2025-06-25 22:56:17 +01:00
Claude Assistant d44ea9c6e5 Fix remaining import errors in CSharpLanguageServer
- Change from solidlsp.exceptions to solidlsp.ls_exceptions
- Change from solidlsp.logger to solidlsp.ls_logger

These modules follow the ls_ prefix convention used throughout the solidlsp package.
2025-06-25 22:27:24 +01:00
Claude Assistant 9a2c1659cd Fix import error in CSharpLanguageServer
Fixed incorrect import path: changed from 'solidlsp.config' to 'solidlsp.ls_config'
to match the actual module structure used throughout the codebase.
2025-06-25 22:24:39 +01:00
Claude Assistant ac7547308e Replace csharp-ls with official Microsoft.CodeAnalysis.LanguageServer
This commit updates the C# language server implementation to use the official
Microsoft.CodeAnalysis.LanguageServer package instead of csharp-ls.

Key changes:
- Download and use platform-specific Microsoft.CodeAnalysis.LanguageServer packages
- Support for Windows, Linux, and macOS with appropriate runtime IDs
- Automatic package download and caching in ~/.cache/serena/language-servers/
- Uses stdio communication by default
- Enhanced initialization with workspace folders support

The new implementation provides better stability and feature parity with
VS Code's official C# extension since it uses the same underlying language server.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 22:16:39 +01:00
Tom Longhurst eb8b118d62 Initial Commit 2025-06-25 22:01:46 +01:00
Michael Panchenko 13d2051bab CONTRIBUTING.md, updated LS adding instructions [ci skip] 2025-06-25 18:15:03 +02:00
Michael Panchenko 4fd281b7bc Readme: removed mentions of goose 2025-06-25 18:15:03 +02:00
Dominik Jain b1eba4563e LS.request_parsed_file: Enable followlinks in os.walk 2025-06-24 16:14:09 +02:00
Michael Panchenko edc5112fea Skip not found files in request_parsed_files with a warning
Instead of raising an error
2025-06-24 15:05:42 +02:00
Dominik Jain 458f218c12 Merge pull request #227 from oraios/task-queue-async-init
Use a synchronized task queue for agent tasks and LS initialization
2025-06-24 13:51:16 +02:00
Dominik Jain 1a055cf2bb Do not log error determining Serena git commit id (not possible when using uvx) 2025-06-24 13:48:34 +02:00
Dominik Jain 2b68790bce Add method execute_task for synchronous execution and apply it in demo script 2025-06-24 13:33:15 +02:00
Dominik Jain e1d664b25d Assign meaningful names to tasks 2025-06-24 13:24:48 +02:00
Dominik Jain 76558edd44 Initialize project-specific instances that don't require the LS (such as the memory manager) immediately 2025-06-24 13:24:48 +02:00
Dominik Jain 6c9746ec76 Log task scheduling and execution explicitly, adding task identifiers
Lock task scheduling (just in case we call it from multiple threads in the future)
2025-06-24 13:24:48 +02:00
Dominik Jain e3d021a432 Improve logging to show thread name 2025-06-24 13:24:48 +02:00
Dominik Jain 404f026bbd Use a synchronized task queue for agent tasks (thread pool with 1 worker),
which we also use to start the language server in the background
2025-06-24 13:24:48 +02:00
Dominik Jain d3b1f9bb90 Explain language choice in more detail 2025-06-23 22:08:14 +02:00
Michael Panchenko 540b678676 project template, removed javascript [ci skip] 2025-06-23 21:58:25 +02:00
Michael Panchenko 757e4bb79b Memories [ci skip] 2025-06-23 21:46:51 +02:00
Dominik Jain 15e835da75 Merge branch 'main' of github.com:oraios/serena 2025-06-23 21:40:20 +02:00
Dominik Jain bffea2172c Re-add multilspy folders to exclusions
as unversioned files (*/static) remain unless explicitly deleted
2025-06-23 21:40:02 +02:00
Michael Panchenko 1de0a186ce Bumped cache version [ci skip] 2025-06-23 21:29:20 +02:00
Michael Panchenko ac4ef9911e changelog [ci skip] 2025-06-23 21:26:38 +02:00
Michael Panchenko 42a8796353 search_for_pattern: better default and description of restrict_search_to_code_files param 2025-06-23 21:22:59 +02:00
Dominik Jain 449188693e Consider timeout for LS requests 2025-06-23 21:15:32 +02:00