Commit Graph

774 Commits

Author SHA1 Message Date
Jaen ba8f07d836 Fix gitignore anchored pattern logic and update test
- Use correct anchoring logic: only patterns starting with '/' are anchored
- Fix test expectation for negation patterns to match Git behavior
- Apply code formatting
2025-07-24 23:35:54 +03:00
Jaen 1d65c85485 Fix gitignore parsing for anchored patterns and escaped characters
- Move escaped character handling after negation pattern detection
- Fix is_anchored logic to only check for leading "/" instead of any "/"
- Properly remove directory markers with removesuffix("/")

Addresses gitignore parsing issues mentioned in #348
2025-07-24 23:23:28 +03:00
Michael Panchenko e49dbdc737 Merge pull request #349 from oraios/improve_search_for_nonignored_files
Improved performance of find_all_non_ignored_files
2025-07-24 19:48:05 +02:00
MischaPanch 81615c4176 Always ignore paths in .git 2025-07-24 19:45:24 +02:00
Bingbing Zhang 0abb8be85a Adds request_document_diagnostic to solidlsp (#347) 2025-07-24 19:10:53 +02:00
MischaPanch 25139d1d74 Improved performance of find_all_non_ignored_files by not descending into ignored dirs 2025-07-24 19:02:33 +02:00
MischaPanch 2909c67d50 Dashboard: minor fix, use 0.0.0.0 in port search instead of localhost
Possible related to docker on WSL issues
2025-07-24 00:35:11 +02:00
Dominik Jain f2b01a0573 GitignoreParser.should_ignore: Always ignore paths outside of the repository root #330 2025-07-23 15:57:06 +02:00
Dominik Jain 9e629de894 Log full traceback for startup project activation error 2025-07-22 23:39:32 +02:00
MischaPanch 6094b0fda7 Bump version (0.1.2 wheel is broken) 2025-07-22 00:07:40 +02:00
MischaPanch 4623b98feb Fixed hatchling build section, bumped version 2025-07-21 15:42:47 +02:00
MischaPanch 8b3b2fe433 Set version to 0.1.0, changelog [ci skip] 2025-07-21 15:18:44 +02:00
Dominik Jain 8fca531e7a Moved assertion to the right place 2025-07-21 11:53:10 +02:00
MischaPanch 21c26b52f8 Raised log to warning if LS can't parse a code file 2025-07-21 11:41:29 +02:00
Dominik Jain 8e8c8f8875 Handle None response to document_symbols request (just return empty lists) 2025-07-21 11:29:41 +02:00
Michael Panchenko bfaae538f6 Merge pull request #321 from oraios/capture-startup-logs
Capture startup logs and other logging improvements
2025-07-21 10:38:50 +02:00
Dominik Jain 99024b8cc5 Add abstraction RegisteredProject, which serves as a factory for Project
(allowing projects to be lazy-loaded)
2025-07-20 19:24:24 +02:00
Dominik Jain ec0ae570a5 Fix Dashboard not being opened in browser with MCP server active
(join on subprocess is necessary in fastmcp context but isn't without it)
2025-07-20 18:55:21 +02:00
Dominik Jain 3799b80266 Remove obsolete status messages 2025-07-20 18:39:36 +02:00
Dominik Jain cbd2184fdd Initialize stderr stream logger early
and make the fastmcp configuration function do nothing if log handlers already exist
2025-07-20 18:39:20 +02:00
Dominik Jain 318f7124a3 Capture startup logs (and display them in GUI viewer and/or dashboard)
* Create a memory log handler that captures them
  * Make both dashboard & GUI build on the same type of handler
2025-07-20 17:58:19 +02:00
Michael Panchenko 992d4927b8 GH workflow fü release to pypi 2025-07-20 14:12:45 +02:00
Dominik Jain 2f82a9eb33 Log project config creation time 2025-07-20 12:58:26 +02:00
Dominik Jain 62cce5d66a Update deprecation info 2025-07-20 11:59:46 +02:00
Dominik Jain 820525fe13 Merge pull request #305 from oraios/jetbrains
Add multi-instance support for JetBrains mode
2025-07-20 00:01:20 +02:00
Dominik Jain b63f30d77f Refactor handling of IDE context when determining exposed tools 2025-07-19 22:55:42 +02:00
Dominik Jain fcca03db9c Add method SerenaAgent.load_project_from_path_or_name 2025-07-19 22:36:57 +02:00
Dominik Jain 4506c87d99 Move flag indicating new project creation into Project representation 2025-07-19 22:26:40 +02:00
Dominik Jain 0def7aaecc Remove obsolete flag returned by ProjectConfig.load
which was never correctly returned anyway (due to a logic error)
2025-07-19 22:21:21 +02:00
Michael Panchenko 933fbee32b Merge pull request #319 from oraios/feature/dont_expose_tools_excluded_by_project/cc_serena
Apply project-specific tool exclusions early, cc_serena
2025-07-19 21:20:09 +02:00
Michael Panchenko 077f50a9b9 Corrected conditional on project existence 2025-07-19 20:44:43 +02:00
Michael Panchenko b9065ca636 Typing, removed unused method (minor) 2025-07-19 20:12:54 +02:00
Michael Panchenko 4dada35767 Apply project-specific tool exclusions early, cc_serena
Tokens: 1691910
Prompt (after initial instructions):
When the serena mcp server is started in ide-assistant mode and a project is passed, we should:                                                                                                                         │
│                                                                                                                                                                                                                           │
│   1. check the excluded tools from the project.yml. If no project.yml exists, there are no excluded tools there. You can use the Project or ProjectConfig classes for that.                                               │
│   2. exclude the tools there a-priori for the entire session, like the tools that are excluded from the context                                                                                                           │
│   3. exclude the activate_project tool                                                                                                                                                                                    │
│                                                                                                                                                                                                                           │
│   The code modification should happen in SerenaAgent, the problematic block is here:                                                                                                                                      │
│                                                                                                                                                                                                                           │
│           # determine the base toolset defining the set of exposed tools (which e.g. the MCP shall see),                                                                                                                  │
│           # limited by the Serena config, the context (which is fixed for the session) and JetBrains mode                                                                                                                 │
│           tool_inclusion_definitions = [self.serena_config, self._context]                                                                                                                                                │
│           if self.serena_config.jetbrains:                                                                                                                                                                                │
│               tool_inclusion_definitions.append(SerenaAgentMode.from_name_internal("jetbrains"))                                                                                                                          │
│           self._base_tool_set = ToolSet.default().apply(*tool_inclusion_definitions)                                                                                                                                      │
│           self._exposed_tools = {tc: t for tc, t in self._all_tools.items() if self._base_tool_set.includes_name(t.get_name())}                                                                                           │
│           log.info(f"Number of exposed tools: {len(self._exposed_tools)}")                                                                                                                                                │
│                                                                                                                                                                                                                           │
│   The exposed tools should be adjusted to reflect the logic I mentioned above
2025-07-19 18:56:34 +02:00
Dominik Jain ea5e0ced3c Catch all project activation errors for initial project 2025-07-18 11:36:01 +02:00
Dominik Jain ac12430182 Expose top-level command serena which now contains all other commands 2025-07-18 11:28:38 +02:00
Dominik Jain eed2057a13 Allow multiple projects with the same name
(but raise an error when trying to activate by non-unique name)
2025-07-18 10:51:14 +02:00
Dominik Jain e5aae3ee41 Merge branch 'feature/enhanced_cli' 2025-07-17 17:09:35 +02:00
Michael Panchenko c5fe377693 Readme: mention Serena's usefulness in coding assistants 2025-07-17 17:04:33 +02:00
Dominik Jain b3b24ebfe6 Make opening robust on Windows, using notepad.exe as a fallback 2025-07-17 16:45:39 +02:00
Michael Panchenko 7a89f32a6a Typo 2025-07-17 16:21:06 +02:00
Michael Panchenko eabf2ac09f Better help messages in cli 2025-07-17 16:10:24 +02:00
Michael Panchenko 108eded31a Missing entry in pyproject 2025-07-17 16:00:34 +02:00
Michael Panchenko dbacca6c5b Enhanced serena cli
We can manage configs and modes through it now
2025-07-17 15:26:32 +02:00
Michael Panchenko 0d4263e91d Added mode and context templates 2025-07-17 10:59:15 +02:00
Michael Panchenko e596319492 Possibility to load modes and contexts by name from $HOME/.serena 2025-07-17 00:28:29 +02:00
Michael Panchenko cad4df59cc Refactoring (minor): move all cli related things to a dedicated module 2025-07-16 18:27:13 +02:00
Michael Panchenko b9aadb3455 Support for using experimental language servers 2025-07-16 18:12:54 +02:00
Michael Panchenko a9bc2c6483 Minor extension of print_system_prompt command, added explanation on using it to readme [ci skip] 2025-07-16 15:48:37 +02:00
Michael Panchenko f654e1fe25 Add print-system-prompt command to output InitialInstructionsTool result
This command creates a SerenaAgent instance for a project and uses the InitialInstructionsTool
to output the system prompt/initial instructions. It follows the same pattern as the existing
index-project command and can be run with: uv run print-system-prompt [project_path]

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 14:43:53 +02:00
Michael Panchenko 85ee10662b Prompting: more explicit instructions on reading symbolic tools instead of reading [ci skip]
In ide-assistant context
2025-07-16 13:37:58 +02:00