feat: add review_code tool handler
This commit is contained in:
@@ -342,6 +342,21 @@ Create `src/tools/review-code.js` and `test/tools/review-code.test.js`.
|
||||
- OpenAI errors pass through `String(err)` unchanged (no wrapping/reformatting).
|
||||
- Mirror 4.1 and 4.2 structure: ~28 orchestration-only tests covering the same test categories.
|
||||
|
||||
Status: ✅ Complete
|
||||
|
||||
### Task 4.4 - debug_issue tool handler (NEXT)
|
||||
|
||||
Create `src/tools/debug-issue.js` and `test/tools/debug-issue.test.js`.
|
||||
|
||||
**Requirements:**
|
||||
- Export `handleDebugIssue(input, deps)` as standalone dependency-injected function.
|
||||
- Execution order: validateToolInput → loadConfig → checkContextBudget → buildDebugIssuePrompt → createOpenAIClient → sendOpenAIResponse.
|
||||
- Inject only 3 external deps: `loadConfig`, `createOpenAIClient`, `sendOpenAIResponse`. Internal utilities imported directly.
|
||||
- If budget check fails (`ok: false`), immediately return that result — do not call buildDebugIssuePrompt or create client.
|
||||
- All paths return structured `{ ok, answer|error, warnings }` — never throws to caller.
|
||||
- OpenAI errors pass through `String(err)` unchanged (no wrapping/reformatting).
|
||||
- Mirror 4.1/4.2/4.3 structure: ~28 orchestration-only tests covering the same test categories.
|
||||
|
||||
Status: ⬜ Pending
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user