mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Show inactive terminals new output; update prompt
This commit is contained in:
@@ -41,7 +41,7 @@ CAPABILITIES
|
||||
- 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.
|
||||
- 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.
|
||||
- For example, when asked to make edits or improvements you might analyze the file structure in the initial potentially_relevant_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 the write_to_file tool to implement 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.
|
||||
- The execute_command tool lets you run commands on the user's computer and should be used 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.
|
||||
- The execute_command tool lets you run commands on the user's computer and should be used 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.
|
||||
|
||||
====
|
||||
|
||||
@@ -1775,7 +1775,7 @@ ${
|
||||
// }
|
||||
// }
|
||||
|
||||
const busyTerminals = this.terminalManager.getBusyTerminals()
|
||||
const busyTerminals = this.terminalManager.getTerminals(true)
|
||||
if (busyTerminals.length > 0) {
|
||||
details += "\n\n# Active Terminals"
|
||||
for (const busyTerminal of busyTerminals) {
|
||||
@@ -1789,6 +1789,28 @@ ${
|
||||
}
|
||||
}
|
||||
|
||||
// only show inactive terminals if there's output to show
|
||||
const inactiveTerminals = this.terminalManager.getTerminals(false)
|
||||
if (inactiveTerminals.length > 0) {
|
||||
const inactiveTerminalOutputs = new Map<number, string>()
|
||||
for (const inactiveTerminal of inactiveTerminals) {
|
||||
const newOutput = this.terminalManager.getUnretrievedOutput(inactiveTerminal.id)
|
||||
if (newOutput) {
|
||||
inactiveTerminalOutputs.set(inactiveTerminal.id, newOutput)
|
||||
}
|
||||
}
|
||||
if (inactiveTerminalOutputs.size > 0) {
|
||||
details += "\n\n# Inactive Terminals"
|
||||
for (const [terminalId, newOutput] of inactiveTerminalOutputs) {
|
||||
const inactiveTerminal = inactiveTerminals.find((t) => t.id === terminalId)
|
||||
if (inactiveTerminal) {
|
||||
details += `\n## ${inactiveTerminal.lastCommand}`
|
||||
details += `\n### New Output\n${newOutput}`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (includeFileDetails) {
|
||||
const isDesktop = cwd === path.join(os.homedir(), "Desktop")
|
||||
const files = await listFiles(cwd, !isDesktop)
|
||||
|
||||
Reference in New Issue
Block a user