mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 00:16:57 +00:00
Merge branch 'main' of github.com:oraios/serena
This commit is contained in:
commit
452aeaf68f
2 files changed
+17
-6
No files matched your search
@@ -11,6 +11,8 @@ prompts:
|
||||
You need to identify at least the following information:
|
||||
* the project's purpose
|
||||
* the tech stack used
|
||||
* the code style and conventions used (including naming, type hints, docstrings, etc.)
|
||||
* which commands to run when a task is completed (linting, formatting, testing, etc.)
|
||||
* the rough structure of the codebase
|
||||
* the commands for testing, formatting, and linting
|
||||
* the commands for running the entrypoints of the project
|
||||
@@ -26,7 +28,9 @@ prompts:
|
||||
|
||||
After collecting all the information, you will use the `write_memory` tool (in multiple calls) to save it to various memory files.
|
||||
A particularly important memory file will be the `suggested_commands.md` file, which should contain
|
||||
a list of commands that the user should know about to develop code in this project.
|
||||
a list of commands that the user should know about to develop code in this project.
|
||||
Moreover, you should create memory files for the style and conventions and a dedicated memory file for
|
||||
what should be done when a task is completed.
|
||||
**Important**: after done with the onboarding task, remember to call the `write_memory` to save the collected information!
|
||||
|
||||
think_about_collected_information: |
|
||||
@@ -36,7 +40,7 @@ prompts:
|
||||
|
||||
think_about_task_adherence: |
|
||||
Are you deviating from the task at hand? Do you need any additional information to proceed?
|
||||
Have you loaded the relevant memory file to see whether your implementation is fully aligned with the
|
||||
Have you loaded all relevant memory files to see whether your implementation is fully aligned with the
|
||||
code style, conventions, and guidelines of the project? If not, adjust your implementation accordingly
|
||||
before modifying any code into the codebase.
|
||||
Note that it is better to stop and ask the user for clarification
|
||||
@@ -49,6 +53,7 @@ prompts:
|
||||
Have you already performed all the steps required by the task? Is it appropriate to run tests and linting, and if so,
|
||||
have you done that already? Should new tests be written to cover the changes?
|
||||
Note that a task that is just about exploring the codebase does not require running tests or linting.
|
||||
Read the corresponding memory files to see what should be done when a task is completed. You might need to list them first.
|
||||
|
||||
summarize_changes: |
|
||||
Summarize all the changes you have made to the codebase over the course of the conversation.
|
||||
|
||||
+10
-4
@@ -441,7 +441,9 @@ class FindSymbolTool(Tool):
|
||||
retrieved symbol.
|
||||
:param dir_relative_path: pass a directory relative path to only consider symbols within this directory.
|
||||
If None, the entire codebase will be considered.
|
||||
:param include_body: whether to include the body of all symbols in the result.
|
||||
:param include_body: whether to include the body of all symbols in the result. You should only use this
|
||||
if you actually need the body of the symbol for the task at hand (for example, for a deep analysis
|
||||
of the functionality or for an editing task).
|
||||
:param include_kinds: an optional list of ints representing the LSP symbol kind.
|
||||
If provided, only symbols of the given kinds will be included in the result.
|
||||
Valid kinds:
|
||||
@@ -496,7 +498,11 @@ class FindReferencingSymbolsTool(Tool):
|
||||
:param relative_path: the relative path to the file containing the symbol
|
||||
:param line: the line number
|
||||
:param column: the column
|
||||
:param include_body: whether to include the body of the symbols in the result
|
||||
:param include_body: whether to include the body of the symbols in the result.
|
||||
Note that this might lead to a very long output, so you should only use this if you actually need the body
|
||||
of the referencing symbols for the task at hand. Usually it is a better idea to find
|
||||
the referencing symbols without the body and then use the find_symbol tool to get the body of
|
||||
specific symbols if needed.
|
||||
:param include_kinds: an optional list of integers representing the LSP symbol kinds to include.
|
||||
If provided, only symbols of the given kinds will be included in the result.
|
||||
Valid kinds:
|
||||
@@ -742,7 +748,7 @@ class WriteMemoryTool(Tool):
|
||||
|
||||
def apply(self, memory_file_name: str, content: str, max_answer_chars: int = _DEFAULT_MAX_ANSWER_LENGTH) -> str:
|
||||
"""
|
||||
Write some general information about this project that can be useful for future tasks to a memory file.
|
||||
Write some information about this project that can be useful for future tasks to a memory file.
|
||||
The information should be short and to the point.
|
||||
The memory file name should be meaningful, such that from the name you can infer what the information is about.
|
||||
It is better to have multiple small memory files than to have a single large one because
|
||||
@@ -768,7 +774,7 @@ class ReadMemoryTool(Tool):
|
||||
def apply(self, memory_file_name: str, max_answer_chars: int = _DEFAULT_MAX_ANSWER_LENGTH) -> str:
|
||||
"""
|
||||
Read the content of a memory file. This tool should only be used if the information
|
||||
is relevant to the current task. You should be able to infer whether the information
|
||||
is relevant to the current task. You can infer whether the information
|
||||
is relevant from the memory file name.
|
||||
You should not read the same memory file multiple times in the same conversation.
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user