Skip to content

Commit 719d661

Browse files
authored
Add optional mode suggestions to follow-up questions (RooCodeInc#5200)
1 parent 3a8ba27 commit 719d661

17 files changed

+398
-32
lines changed

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,18 @@ Parameters:
277277
1. Be provided in its own <suggest> tag
278278
2. Be specific, actionable, and directly related to the completed task
279279
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.
280+
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
281+
- 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
280282
Usage:
281283
<ask_followup_question>
282284
<question>Your question here</question>
283285
<follow_up>
284286
<suggest>
285287
Your suggested answer here
286288
</suggest>
289+
<suggest mode="code">
290+
Implement the solution
291+
</suggest>
287292
</follow_up>
288293
</ask_followup_question>
289294

@@ -297,6 +302,16 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
297302
</follow_up>
298303
</ask_followup_question>
299304

305+
Example: Asking a question with mode switching options
306+
<ask_followup_question>
307+
<question>How would you like to proceed with this task?</question>
308+
<follow_up>
309+
<suggest mode="code">Start implementing the solution</suggest>
310+
<suggest mode="architect">Plan the architecture first</suggest>
311+
<suggest>Continue with more details</suggest>
312+
</follow_up>
313+
</ask_followup_question>
314+
300315
## attempt_completion
301316
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.
302317
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.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,18 @@ Parameters:
174174
1. Be provided in its own <suggest> tag
175175
2. Be specific, actionable, and directly related to the completed task
176176
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.
177+
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
178+
- 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
177179
Usage:
178180
<ask_followup_question>
179181
<question>Your question here</question>
180182
<follow_up>
181183
<suggest>
182184
Your suggested answer here
183185
</suggest>
186+
<suggest mode="code">
187+
Implement the solution
188+
</suggest>
184189
</follow_up>
185190
</ask_followup_question>
186191

@@ -194,6 +199,16 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
194199
</follow_up>
195200
</ask_followup_question>
196201

202+
Example: Asking a question with mode switching options
203+
<ask_followup_question>
204+
<question>How would you like to proceed with this task?</question>
205+
<follow_up>
206+
<suggest mode="code">Start implementing the solution</suggest>
207+
<suggest mode="architect">Plan the architecture first</suggest>
208+
<suggest>Continue with more details</suggest>
209+
</follow_up>
210+
</ask_followup_question>
211+
197212
## attempt_completion
198213
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.
199214
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.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,18 @@ Parameters:
348348
1. Be provided in its own <suggest> tag
349349
2. Be specific, actionable, and directly related to the completed task
350350
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.
351+
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
352+
- 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
351353
Usage:
352354
<ask_followup_question>
353355
<question>Your question here</question>
354356
<follow_up>
355357
<suggest>
356358
Your suggested answer here
357359
</suggest>
360+
<suggest mode="code">
361+
Implement the solution
362+
</suggest>
358363
</follow_up>
359364
</ask_followup_question>
360365

@@ -368,6 +373,16 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
368373
</follow_up>
369374
</ask_followup_question>
370375

376+
Example: Asking a question with mode switching options
377+
<ask_followup_question>
378+
<question>How would you like to proceed with this task?</question>
379+
<follow_up>
380+
<suggest mode="code">Start implementing the solution</suggest>
381+
<suggest mode="architect">Plan the architecture first</suggest>
382+
<suggest>Continue with more details</suggest>
383+
</follow_up>
384+
</ask_followup_question>
385+
371386
## attempt_completion
372387
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.
373388
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.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,18 @@ Parameters:
348348
1. Be provided in its own <suggest> tag
349349
2. Be specific, actionable, and directly related to the completed task
350350
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.
351+
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
352+
- 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
351353
Usage:
352354
<ask_followup_question>
353355
<question>Your question here</question>
354356
<follow_up>
355357
<suggest>
356358
Your suggested answer here
357359
</suggest>
360+
<suggest mode="code">
361+
Implement the solution
362+
</suggest>
358363
</follow_up>
359364
</ask_followup_question>
360365

@@ -368,6 +373,16 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
368373
</follow_up>
369374
</ask_followup_question>
370375

376+
Example: Asking a question with mode switching options
377+
<ask_followup_question>
378+
<question>How would you like to proceed with this task?</question>
379+
<follow_up>
380+
<suggest mode="code">Start implementing the solution</suggest>
381+
<suggest mode="architect">Plan the architecture first</suggest>
382+
<suggest>Continue with more details</suggest>
383+
</follow_up>
384+
</ask_followup_question>
385+
371386
## attempt_completion
372387
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.
373388
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.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,18 @@ Parameters:
304304
1. Be provided in its own <suggest> tag
305305
2. Be specific, actionable, and directly related to the completed task
306306
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.
307+
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
308+
- 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
307309
Usage:
308310
<ask_followup_question>
309311
<question>Your question here</question>
310312
<follow_up>
311313
<suggest>
312314
Your suggested answer here
313315
</suggest>
316+
<suggest mode="code">
317+
Implement the solution
318+
</suggest>
314319
</follow_up>
315320
</ask_followup_question>
316321

@@ -324,6 +329,16 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
324329
</follow_up>
325330
</ask_followup_question>
326331

332+
Example: Asking a question with mode switching options
333+
<ask_followup_question>
334+
<question>How would you like to proceed with this task?</question>
335+
<follow_up>
336+
<suggest mode="code">Start implementing the solution</suggest>
337+
<suggest mode="architect">Plan the architecture first</suggest>
338+
<suggest>Continue with more details</suggest>
339+
</follow_up>
340+
</ask_followup_question>
341+
327342
## attempt_completion
328343
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.
329344
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.

src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,18 @@ Parameters:
299299
1. Be provided in its own <suggest> tag
300300
2. Be specific, actionable, and directly related to the completed task
301301
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.
302+
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
303+
- 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
302304
Usage:
303305
<ask_followup_question>
304306
<question>Your question here</question>
305307
<follow_up>
306308
<suggest>
307309
Your suggested answer here
308310
</suggest>
311+
<suggest mode="code">
312+
Implement the solution
313+
</suggest>
309314
</follow_up>
310315
</ask_followup_question>
311316

@@ -319,6 +324,16 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
319324
</follow_up>
320325
</ask_followup_question>
321326

327+
Example: Asking a question with mode switching options
328+
<ask_followup_question>
329+
<question>How would you like to proceed with this task?</question>
330+
<follow_up>
331+
<suggest mode="code">Start implementing the solution</suggest>
332+
<suggest mode="architect">Plan the architecture first</suggest>
333+
<suggest>Continue with more details</suggest>
334+
</follow_up>
335+
</ask_followup_question>
336+
322337
## attempt_completion
323338
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.
324339
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.

src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,18 @@ Parameters:
352352
1. Be provided in its own <suggest> tag
353353
2. Be specific, actionable, and directly related to the completed task
354354
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.
355+
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
356+
- 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
355357
Usage:
356358
<ask_followup_question>
357359
<question>Your question here</question>
358360
<follow_up>
359361
<suggest>
360362
Your suggested answer here
361363
</suggest>
364+
<suggest mode="code">
365+
Implement the solution
366+
</suggest>
362367
</follow_up>
363368
</ask_followup_question>
364369

@@ -372,6 +377,16 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
372377
</follow_up>
373378
</ask_followup_question>
374379

380+
Example: Asking a question with mode switching options
381+
<ask_followup_question>
382+
<question>How would you like to proceed with this task?</question>
383+
<follow_up>
384+
<suggest mode="code">Start implementing the solution</suggest>
385+
<suggest mode="architect">Plan the architecture first</suggest>
386+
<suggest>Continue with more details</suggest>
387+
</follow_up>
388+
</ask_followup_question>
389+
375390
## attempt_completion
376391
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.
377392
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.

src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,18 @@ Parameters:
299299
1. Be provided in its own <suggest> tag
300300
2. Be specific, actionable, and directly related to the completed task
301301
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.
302+
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
303+
- 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
302304
Usage:
303305
<ask_followup_question>
304306
<question>Your question here</question>
305307
<follow_up>
306308
<suggest>
307309
Your suggested answer here
308310
</suggest>
311+
<suggest mode="code">
312+
Implement the solution
313+
</suggest>
309314
</follow_up>
310315
</ask_followup_question>
311316

@@ -319,6 +324,16 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
319324
</follow_up>
320325
</ask_followup_question>
321326

327+
Example: Asking a question with mode switching options
328+
<ask_followup_question>
329+
<question>How would you like to proceed with this task?</question>
330+
<follow_up>
331+
<suggest mode="code">Start implementing the solution</suggest>
332+
<suggest mode="architect">Plan the architecture first</suggest>
333+
<suggest>Continue with more details</suggest>
334+
</follow_up>
335+
</ask_followup_question>
336+
322337
## attempt_completion
323338
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.
324339
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.

0 commit comments

Comments
 (0)