← Back to Kontasks
Git API Endpoints Added
Added /api/show-diff and /api/revert-commit endpoints to konui router
Output
✅ Git API Endpoints Added
GET /api/show-diff
Returns the full diff for a commit.
curl 'https://greatvibe.ai/api/show-diff?sha=99c6953b'
{
"sha": "99c6953b",
"diff": "commit 99c6953b...\n+ // Git API: Show diff..."
}
POST /api/revert-commit
Reverts a commit by creating a new revert commit.
curl -X POST 'https://greatvibe.ai/api/revert-commit' \
-H 'Content-Type: application/json' \
-d '{"sha": "99c6953b"}'
{
"success": true,
"revertedSha": "99c6953b",
"newCommitSha": "abc123...",
"message": "Commit reverted successfully"
}
🔒 Security
- SHA format validation (prevents command injection)
- Commit existence verification before revert
- Action logging with username
📝 Commit
99c6953b - Turn: Add git diff and revert API endpoints
What's Next?
Choose an action:
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
apigitkontasks
Created
7 Jan 2026, 1:26 pm
Updated
7 Jan 2026, 1:26 pm
Timing
⏱️ 126.9s
0 tools
● TTFE 0%
● Thinking 100%
● Tools 0%
Created By
claude
🔗 Git Commit
99c6953b
Raw Data
{
"id": "76c1706a-182f-4f39-964f-aee46c273ad5",
"type": "general",
"status": "completed",
"title": "Git API Endpoints Added",
"description": "Added /api/show-diff and /api/revert-commit endpoints to konui router",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:sans-serif;\">\n<h2 style=\"color:#fff;margin:0 0 16px 0;\">✅ Git API Endpoints Added</h2>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#98c379;margin:0 0 12px 0;\">GET /api/show-diff</h3>\n<p style=\"margin:0 0 8px 0;color:#9ca3af;\">Returns the full diff for a commit.</p>\n<pre style=\"background:#1e1e1e;padding:12px;border-radius:4px;overflow-x:auto;color:#e5c07b;margin:0;\">\ncurl 'https://greatvibe.ai/api/show-diff?sha=99c6953b'\n\n{\n \"sha\": \"99c6953b\",\n \"diff\": \"commit 99c6953b...\\n+ // Git API: Show diff...\"\n}\n</pre>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#61afef;margin:0 0 12px 0;\">POST /api/revert-commit</h3>\n<p style=\"margin:0 0 8px 0;color:#9ca3af;\">Reverts a commit by creating a new revert commit.</p>\n<pre style=\"background:#1e1e1e;padding:12px;border-radius:4px;overflow-x:auto;color:#e5c07b;margin:0;\">\ncurl -X POST 'https://greatvibe.ai/api/revert-commit' \\\n -H 'Content-Type: application/json' \\\n -d '{\"sha\": \"99c6953b\"}'\n\n{\n \"success\": true,\n \"revertedSha\": \"99c6953b\",\n \"newCommitSha\": \"abc123...\",\n \"message\": \"Commit reverted successfully\"\n}\n</pre>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#c678dd;margin:0 0 12px 0;\">🔒 Security</h3>\n<ul style=\"margin:0;padding-left:20px;line-height:1.8;\">\n<li style=\"color:#9ca3af;\">SHA format validation (prevents command injection)</li>\n<li style=\"color:#9ca3af;\">Commit existence verification before revert</li>\n<li style=\"color:#9ca3af;\">Action logging with username</li>\n</ul>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#56b6c2;margin:0 0 12px 0;\">📝 Commit</h3>\n<p style=\"margin:0;color:#9ca3af;\"><code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">99c6953b</code> - Turn: Add git diff and revert API endpoints</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;\">\n<h4 style=\"margin:0 0 8px 0;color:#fff;\">What's Next?</h4>\n<p style=\"color:#9ca3af;margin:0;\">Choose an action:</p>\n</div>\n</div>",
"requestedAt": "2026-01-07T03:30:00.000Z",
"requestId": "df9390cc-7c66-4e13-9cac-ecdcf5097365",
"commitSha": "99c6953b",
"choices": [
{
"label": "Restart konui",
"value": "Restart konui to apply the new API endpoints",
"primary": true
},
{
"label": "Test endpoints",
"value": "Test the /api/show-diff and /api/revert-commit endpoints with curl"
},
{
"label": "Update kontask UI",
"value": "Add diff viewer and rollback button to the kontask detail page"
}
],
"turnTiming": {
"totalMs": 126934,
"ttfeMs": 101,
"thinkingMs": 126833,
"toolExecutionMs": 0,
"toolCallCount": 0,
"thinkingPct": 100,
"toolsPct": 0,
"ttfePct": 0
}
},
"createdBy": "claude",
"createdAt": "2026-01-07T03:26:53.871Z",
"updatedAt": "2026-01-07T03:26:57.362Z",
"requestId": "df9390cc-7c66-4e13-9cac-ecdcf5097365",
"scope": "vibetools",
"tags": [
"api",
"git",
"kontasks"
],
"targetUser": "claude"
}