mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
feat: simplify attempt_completion tool description
- Removed complex warning about confirming previous tool success - Simplified description to focus on task completion signaling - Emphasized conciseness and directness in result parameter - Updated tests to match new description requirements - Made the tool's purpose clearer for AI assistants
This commit is contained in:
parent
3ee607202e
commit
f755d08431
2 changed files with 10 additions and 7 deletions
|
|
@ -56,14 +56,17 @@ describe("getAttemptCompletionDescription", () => {
|
|||
const description = getAttemptCompletionDescription()
|
||||
|
||||
// Should contain core functionality
|
||||
const coreText = "After each tool use, the user will respond with the result of that tool use"
|
||||
const coreText = "Use this tool when the current task is complete and you're ready for the user's next request"
|
||||
expect(description).toContain(coreText)
|
||||
|
||||
// Should contain the important note
|
||||
const importantNote = "IMPORTANT NOTE: This tool CANNOT be used until you've confirmed"
|
||||
expect(description).toContain(importantNote)
|
||||
// Should contain the new concise instruction
|
||||
const conciseNote = "Be ** CONCISE ** and ** DIRECT**"
|
||||
expect(description).toContain(conciseNote)
|
||||
|
||||
// Should contain result parameter
|
||||
expect(description).toContain("- result: (required)")
|
||||
|
||||
// Should contain the instruction about not ending with questions
|
||||
expect(description).toContain("**DO NOT** end with questions or offers for further assistance")
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ import { ToolArgs } from "./types"
|
|||
|
||||
export function getAttemptCompletionDescription(args?: ToolArgs): string {
|
||||
return `## attempt_completion
|
||||
Description: After each tool use, the user will respond with the result of that tool use, i.e. if it succeeded or failed, along with any reasons for failure. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user. The user may respond with feedback if they are not satisfied with the result, which you can use to make improvements and try again.
|
||||
IMPORTANT NOTE: This tool CANNOT be used until you've confirmed from the user that any previous tool uses were successful. Failure to do so will result in code corruption and system failure. Before using this tool, you must ask yourself in <thinking></thinking> tags if you've confirmed from the user that any previous tool uses were successful. If not, then DO NOT use this tool.
|
||||
Description: Use this tool when the current task is complete and you're ready for the user's next request. This signals that you've finished the active work and are awaiting further instructions.
|
||||
|
||||
Parameters:
|
||||
- result: (required) The result of the task. Formulate this result in a way that is final and does not require further input from the user. Don't end your result with questions or offers for further assistance.
|
||||
- result: (required) A summary of what was accomplished. Be ** CONCISE ** and ** DIRECT**. **DO NOT** end with questions or offers for further assistance.
|
||||
Usage:
|
||||
<attempt_completion>
|
||||
<result>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue