Add POST /api/semantic-diff endpoint for AI-powered code change explanations
Uses Anthropic claude-sonnet-4-6 server-side to explain the semantic meaning of code diffs in the budget app domain (paychecks, bills, financing, actuals). Input validation rejects empty or oversized (>50KB) diffs. Tests mock the Anthropic client via direct method replacement (same pattern as db.pool.query). Nightshift-Task: semantic-diff Nightshift-Ref: https://github.com/marcus/nightshift
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
"test:watch": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.80.0",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.19.2",
|
||||
|
||||
Reference in New Issue
Block a user