mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 10:19:02 +00:00
Add information on project querying to the documentation & changelog
This commit is contained in:
1 parent
0f6471d2a8
commit
918a90280e
3 files changed
+46
-3
No files matched your search
@@ -7,6 +7,10 @@ Status of the `main` branch. Changes prior to the next official version change w
|
||||
* Project configuration files (`project.yml`) can now define multiple languages.
|
||||
Auto-detection adds only the most prominent language by default.
|
||||
* Additional languages can be conveniently added via the Dashboard while a project is already activated.
|
||||
* Add support for querying projects other than the currently active one via new tools `QueryProjectTool` and `ListQueryableProjectsTool`.
|
||||
The `QueryProjectTool` allows Serena tools to be called on other projects.
|
||||
* For the LSP backend, calling symbolic tools require a project server to be spawned that will launch the respective language servers
|
||||
* For the JetBrains backend, all projects for which IDE instances are open can directly be queried
|
||||
* The current project can be activated automatically even when the MCP configuration is global (through the --project-from-cwd flag)
|
||||
* Support overloaded symbols in `FindSymbolTool` and related tools
|
||||
* Name paths of overloaded symbols now include an index (e.g., `myOverloadedFunction[2]`)
|
||||
|
||||
@@ -36,7 +36,7 @@ For instance, when using `uvx`, run
|
||||
* For an existing project, the main programming language will be detected automatically,
|
||||
but you can choose to explicitly specify multiple languages by passing the `--language` parameter
|
||||
multiple times (e.g. `--language python --language typescript`).
|
||||
* You can optionally specify a custom project name with `--name "My Project"`.
|
||||
* You can optionally specify a custom project name with `--name my-name`.
|
||||
* You can immediately index the project after creation with `--index`.
|
||||
|
||||
(project-config)=
|
||||
@@ -163,4 +163,42 @@ linting results, and test results to assess the correctness of its actions.
|
||||
Therefore, software that is designed to meaningful interpretable outputs (e.g. log messages)
|
||||
and that has a good test coverage is much easier to work with for Serena.
|
||||
|
||||
We generally recommend to start an editing task from a state where all linting checks and tests pass.
|
||||
We generally recommend to start an editing task from a state where all linting checks and tests pass.
|
||||
|
||||
## Working with Multiple Projects Simultaneously
|
||||
|
||||
There are several ways in which you might want to work with multiple projects simultaneously.
|
||||
|
||||
### Simultaneously Editing in Multiple Projects
|
||||
|
||||
If fulfilling a task requires the agent to edit code in multiple projects, the recommended approach is to create a **monorepo folder**,
|
||||
i.e. a folder that contains all the projects as sub-folders, and open that monorepo folder as a project in Serena.
|
||||
You may also use symbolic links to create a monorepo folder if the projects are located in different places on your filesystem.
|
||||
|
||||
If several languages are used across the projects, specify all of them as needed when using the LSP backend;
|
||||
For JetBrains mode, make sure that your IDE is configured to work with all the languages used across the projects (e.g. by installing the respective language plugins).
|
||||
|
||||
(query-projects)=
|
||||
### Reading from External Projects
|
||||
|
||||
If, while working on a project, you want Serena to be able to read code or other information from another project (e.g. a library or otherwise related project),
|
||||
this can be enabled via the `query_project` tool.
|
||||
Provided that the project you want to query is known to Serena (i.e. you have created it as described above),
|
||||
the `query_project` tool allows the agent to query files and symbolic information from that project.
|
||||
|
||||
To enable this tool, [activate the mode](modes) `query-projects`.
|
||||
This also enables a second tool for listing projects that can be queried.
|
||||
|
||||
Depending on the language backend being used, the management of resources for the external projects varies:
|
||||
|
||||
* When using the JetBrains backend, make sure that every project for which you want symbolic queries to work is open in an IDE instance.
|
||||
* When using the LSP backend, executing symbolic tools via the query tool requires that Serena's **Project Server** be started,
|
||||
which will automatically spawn the necessary language servers for the projects that are queried.
|
||||
|
||||
To start the server, run
|
||||
|
||||
<serena> start-project-server
|
||||
|
||||
where `<serena>` is your way of running Serena. For example, when using `uvx`, run
|
||||
|
||||
uvx --from git+https://github.com/oraios/serena serena start-project-server
|
||||
@@ -113,7 +113,8 @@ Examples of built-in modes include:
|
||||
* `one-shot`: Configures Serena for tasks that should be completed in a single response, often used with `planning` for generating reports or initial plans.
|
||||
* `no-onboarding`: Skips the initial onboarding process if it's not needed for a particular session but retains the memory tools (assuming initial memories were created externally).
|
||||
* `onboarding`: Focuses on the project onboarding process.
|
||||
* `no-memories`: Disables all memory tools (and tools building on memories such as onboarding tools)
|
||||
* `no-memories`: Disables all memory tools (and tools building on memories such as onboarding tools)
|
||||
* `query-projects`: Enables tools for querying other Serena projects (without activating them); see section [Reading from External Projects](query-projects)
|
||||
|
||||
Find the concrete definitions of these modes [here](https://github.com/oraios/serena/tree/main/src/serena/resources/config/modes).
|
||||
|
||||
|
||||
Reference in new issue
Block a user