Skip to content

Commit 20c4426

Browse files
committed
fix: update snapshot and reorder capabilities section
- Update system.test.ts snapshot to reflect architect mode without codebase_search enforcement - Reorder capabilities section to place search_files description after codebase_search - Ensures logical flow: codebase_search (semantic) → search_files (regex) → other tools
1 parent d900b27 commit 20c4426

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/prompts/__tests__/__snapshots__/system.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5309,7 +5309,7 @@ Language Preference:
53095309
You should always speak and think in the "en" language.
53105310
53115311
Mode-specific Instructions:
5312-
1. Do some information gathering to get more context about the task. **ALWAYS start with the \`codebase_search\` tool (if available) to understand existing functionality and code structure before using other tools like read_file or search_files.**
5312+
1. Do some information gathering (for example using read_file or search_files) to get more context about the task.
53135313
53145314
2. You should also ask the user clarifying questions to get a better understanding of the task.
53155315

src/core/prompts/sections/capabilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ CAPABILITIES
1616
- You have access to tools that let you execute CLI commands on the user's computer, list files, view source code definitions, regex search${
1717
supportsComputerUse ? ", use the browser" : ""
1818
}, read and write files, and ask follow-up questions. These tools help you effectively accomplish a wide range of tasks, such as writing code, making edits or improvements to existing files, understanding the current state of a project, performing system operations, and much more.
19-
- When the user initially gives you a task, a recursive list of all filepaths in the current workspace directory ('${cwd}') will be included in environment_details. This provides an overview of the project's file structure, offering key insights into the project from directory/file names (how developers conceptualize and organize their code) and file extensions (the language used). This can also guide decision-making on which files to explore further. If you need to further explore directories such as outside the current workspace directory, you can use the list_files tool. If you pass 'true' for the recursive parameter, it will list files recursively. Otherwise, it will list files at the top level, which is better suited for generic directories where you don't necessarily need the nested structure, like the Desktop.
20-
- You can use search_files to perform regex searches across files in a specified directory, outputting context-rich results that include surrounding lines. This is particularly useful for understanding code patterns, finding specific implementations, or identifying areas that need refactoring.${
19+
- When the user initially gives you a task, a recursive list of all filepaths in the current workspace directory ('${cwd}') will be included in environment_details. This provides an overview of the project's file structure, offering key insights into the project from directory/file names (how developers conceptualize and organize their code) and file extensions (the language used). This can also guide decision-making on which files to explore further. If you need to further explore directories such as outside the current workspace directory, you can use the list_files tool. If you pass 'true' for the recursive parameter, it will list files recursively. Otherwise, it will list files at the top level, which is better suited for generic directories where you don't necessarily need the nested structure, like the Desktop.${
2120
codeIndexManager &&
2221
codeIndexManager.isFeatureEnabled &&
2322
codeIndexManager.isFeatureConfigured &&
@@ -26,6 +25,7 @@ CAPABILITIES
2625
- You can use the \`codebase_search\` tool to perform semantic searches across your entire codebase. This tool is powerful for finding functionally relevant code, even if you don't know the exact keywords or file names. It's particularly useful for understanding how features are implemented across multiple files, discovering usages of a particular API, or finding code examples related to a concept. This capability relies on a pre-built index of your code.`
2726
: ""
2827
}
28+
- You can use search_files to perform regex searches across files in a specified directory, outputting context-rich results that include surrounding lines. This is particularly useful for understanding code patterns, finding specific implementations, or identifying areas that need refactoring.
2929
- You can use the list_code_definition_names tool to get an overview of source code definitions for all files at the top level of a specified directory. This can be particularly useful when you need to understand the broader context and relationships between certain parts of the code. You may need to call this tool multiple times to understand various parts of the codebase related to the task.
3030
- For example, when asked to make edits or improvements you might analyze the file structure in the initial environment_details to get an overview of the project, then use list_code_definition_names to get further insight using source code definitions for files located in relevant directories, then read_file to examine the contents of relevant files, analyze the code and suggest improvements or make necessary edits, then use ${diffStrategy ? "the apply_diff or write_to_file" : "the write_to_file"} tool to apply the changes. If you refactored code that could affect other parts of the codebase, you could use search_files to ensure you update other files as needed.
3131
- You can use the execute_command tool to run commands on the user's computer whenever you feel it can help accomplish the user's task. When you need to execute a CLI command, you must provide a clear explanation of what the command does. Prefer to execute complex CLI commands over creating executable scripts, since they are more flexible and easier to run. Interactive and long-running commands are allowed, since the commands are run in the user's VSCode terminal. The user may keep commands running in the background and you will be kept updated on their status along the way. Each command you execute is run in a new terminal instance.${

0 commit comments

Comments
 (0)