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
Copy file name to clipboardExpand all lines: src/core/prompts/tools/native-tools/ask_followup_question.ts
+38-8Lines changed: 38 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,26 @@ import type OpenAI from "openai"
3
3
constASK_FOLLOWUP_QUESTION_DESCRIPTION=`Ask the user a question to gather additional information needed to complete the task. Use when you need clarification or more details to proceed effectively.
4
4
5
5
Parameters:
6
-
- question: (required) A clear, specific question addressing the information needed
6
+
- questions: (required) A list of questions to ask. Each question can be a simple string or an object with "text" and "options" for multiple choice.
7
7
- follow_up: (required) A list of 2-4 suggested answers. Suggestions must be complete, actionable answers without placeholders. Optionally include mode to switch modes (code/architect/etc.)
8
8
9
9
Example: Asking for file path
10
-
{ "question": "What is the path to the frontend-config.json file?", "follow_up": [{ "text": "./src/frontend-config.json", "mode": null }, { "text": "./config/frontend-config.json", "mode": null }, { "text": "./frontend-config.json", "mode": null }] }
10
+
{ "questions": ["What is the path to the frontend-config.json file?"], "follow_up": [{ "text": "./src/frontend-config.json", "mode": null }, { "text": "./config/frontend-config.json", "mode": null }, { "text": "./frontend-config.json", "mode": null }] }
11
+
12
+
Example: Asking with multiple questions and choices
13
+
{
14
+
"questions": [
15
+
{ "text": "Which framework are you using?", "options": ["React", "Vue", "Svelte", "Other"] },
"follow_up": [{ "text": "I've answered the questions", "mode": null }]
20
+
}
11
21
12
22
Example: Asking with mode switch
13
-
{ "question": "Would you like me to implement this feature?", "follow_up": [{ "text": "Yes, implement it now", "mode": "code" }, { "text": "No, just plan it out", "mode": "architect" }] }`
23
+
{ "questions": ["Would you like me to implement this feature?"], "follow_up": [{ "text": "Yes, implement it now", "mode": "code" }, { "text": "No, just plan it out", "mode": "architect" }] }`
14
24
15
-
constQUESTION_PARAMETER_DESCRIPTION=`Clear, specific question that captures the missing information you need`
25
+
constQUESTIONS_PARAMETER_DESCRIPTION=`List of questions to ask. Each question can be a string or an object with "text" and "options" for multiple choice.`
16
26
17
27
constFOLLOW_UP_PARAMETER_DESCRIPTION=`Required list of 2-4 suggested responses; each suggestion must be a complete, actionable answer and may include a mode switch`
0 commit comments