You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: align ask_followup_question tool with current patterns
- Add early return for partial blocks with incomplete required params
- Make follow_up parameter required and validate it properly
- Add validation for empty suggestions array
- Improve error messages to be more specific
- Update prompt description to clarify follow_up is required
- Align error handling with other tools (consecutiveMistakeCount, recordToolError)
- Minor text improvements in prompt description
Copy file name to clipboardExpand all lines: src/core/prompts/tools/ask-followup-question.ts
+3-7Lines changed: 3 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -5,20 +5,16 @@ Parameters:
5
5
- question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need.
6
6
- follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must:
7
7
1. Be provided in its own <suggest> tag
8
-
2. Be specific, actionable, and directly related to the completed task
8
+
2. Be specific, actionable, and directly related to the question
9
9
3. Be a complete answer to the question - the user should not need to provide additional information or fill in any missing details. DO NOT include placeholders with brackets or parentheses.
10
10
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
11
11
- When using the mode attribute, focus the suggestion text on the action to be taken rather than mentioning the mode switch, as the mode change is handled automatically and indicated by a visual badge
12
12
Usage:
13
13
<ask_followup_question>
14
14
<question>Your question here</question>
15
15
<follow_up>
16
-
<suggest>
17
-
Your suggested answer here
18
-
</suggest>
19
-
<suggest mode="code">
20
-
Implement the solution
21
-
</suggest>
16
+
<suggest>Your first suggested answer here</suggest>
17
+
<suggest mode="code">Implement the solution</suggest>
0 commit comments