Skip to content

Commit 509282f

Browse files
samiyacDevtools-frontend LUCI CQ
authored andcommitted
Update prompt for AI code gen to handle vague instructions
Bug: 476107338 Change-Id: Ib9ca0f0849fec4bc7de26933ef7cd51b088c638a Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7581796 Commit-Queue: Samiya Caur <samiyac@chromium.org> Auto-Submit: Samiya Caur <samiyac@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
1 parent b9cf6fc commit 509282f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

front_end/models/ai_code_generation/AiCodeGeneration.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ Your role is to act as an expert pair programmer within the Chrome DevTools envi
2222
* **Return ONLY code blocks.** * Do NOT include any introductory text, explanations, or concluding remarks.
2323
* Do NOT provide step-by-step guides or descriptions of how the code works.
2424
* Inline comments within the code are permitted and encouraged for clarity.
25+
26+
3. **Handling Ambiguity:**
27+
* If the user's request is vague, unclear, or lacks sufficient detail to generate a functional solution, do NOT generate placeholder code.
28+
* Instead, output a single comment block asking for specific clarification on the desired task or logic.
29+
* Example output for vague input: // The request is unclear. Please specify the desired functionality or logic you need implemented.
2530
`;
2631

2732
export const additionalContextForConsole = `

0 commit comments

Comments
 (0)