← Back to Kontasks
Turn Fidelity: konui_get_turn MCP Tool Completed
Output
✅ Turn Fidelity Fixes Complete
Changes Made
- sanitizePrompt() fix in
konui/src/console-history.ts
Added regex to strip<turn-context>tags before processing prompt - konsole endpoint
GET /kontext?requestId=...
New endpoint to fetch kontext by requestId with sanitized prompt - konui_get_turn MCP tool
Merges kontask (HTML output) + kontext (workingHistory, timing, tokens) - Dashboard kontasks endpoint updated
Now returns scope, tags, sessionId, flowId fields
New Tool Usage
// Get full turn data by requestId await konui_get_turn({ requestId: "uuid" }) // Returns: { success: true, requestId: "uuid", kontask: { id, title, type, status, scope, tags, sessionId, flowId, output: "<html>...</html>", // Rich HTML turnTiming, choices }, kontext: { id, sessionId, prompt: "sanitized user prompt", workingHistory: [...], // Full events! timing: { spawnMs, ttfeMs, workMs, totalMs }, tokenUsage: { inputTokens, outputTokens, costUsd } } }
Tested
✅ Konsole /kontext endpoint returns full kontext with workingHistory
✅ Services restarted (konui, konsole)
✅ Commit: d1dfbb5a
Files: konsole/src/main.ts, konsole/src/session.ts, konui/mcp/server.ts, konui/src/console-history.ts, konui/src/router.ts
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
turn-fidelitymcpkontaskkontext
Created
10 Jan 2026, 8:38 am
Updated
10 Jan 2026, 8:38 am
Created By
claude
Raw Data
{
"id": "1f481cb1-bc4f-4437-9021-e43c185e4f0e",
"type": "general",
"status": "completed",
"title": "Turn Fidelity: konui_get_turn MCP Tool Completed",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:'Consolas','Monaco',monospace;\">\n<h2 style=\"font-family:sans-serif;color:#fff;margin:0 0 16px 0;\">✅ Turn Fidelity Fixes Complete</h2>\n\n<h3 style=\"font-family:sans-serif;color:#98c379;margin:16px 0 12px 0;\">Changes Made</h3>\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<ol style=\"margin:0;padding-left:20px;color:#e0e0e0;\">\n<li style=\"margin-bottom:12px;\"><strong style=\"color:#98c379;\">sanitizePrompt() fix</strong> in <code>konui/src/console-history.ts</code><br>\n<span style=\"color:#7f848e;\">Added regex to strip <code><turn-context></code> tags before processing prompt</span></li>\n<li style=\"margin-bottom:12px;\"><strong style=\"color:#61afef;\">konsole endpoint</strong> <code>GET /kontext?requestId=...</code><br>\n<span style=\"color:#7f848e;\">New endpoint to fetch kontext by requestId with sanitized prompt</span></li>\n<li style=\"margin-bottom:12px;\"><strong style=\"color:#e5c07b;\">konui_get_turn MCP tool</strong><br>\n<span style=\"color:#7f848e;\">Merges kontask (HTML output) + kontext (workingHistory, timing, tokens)</span></li>\n<li style=\"margin-bottom:12px;\"><strong style=\"color:#c678dd;\">Dashboard kontasks endpoint</strong> updated<br>\n<span style=\"color:#7f848e;\">Now returns scope, tags, sessionId, flowId fields</span></li>\n</ol>\n</div>\n\n<h3 style=\"font-family:sans-serif;color:#61afef;margin:16px 0 12px 0;\">New Tool Usage</h3>\n<pre style=\"background:#2d2d2d;padding:16px;border-radius:6px;overflow-x:auto;color:#e0e0e0;\">\n<span style=\"color:#7f848e;\">// Get full turn data by requestId</span>\n<span style=\"color:#c678dd;\">await</span> <span style=\"color:#61afef;\">konui_get_turn</span>({ requestId: <span style=\"color:#ce9178;\">\"uuid\"</span> })\n\n<span style=\"color:#7f848e;\">// Returns:</span>\n{\n success: <span style=\"color:#56b6c2;\">true</span>,\n requestId: <span style=\"color:#ce9178;\">\"uuid\"</span>,\n kontask: {\n id, title, type, status,\n scope, tags, sessionId, flowId,\n output: <span style=\"color:#ce9178;\">\"<html>...</html>\"</span>, <span style=\"color:#7f848e;\">// Rich HTML</span>\n turnTiming, choices\n },\n kontext: {\n id, sessionId,\n prompt: <span style=\"color:#ce9178;\">\"sanitized user prompt\"</span>,\n workingHistory: [...], <span style=\"color:#7f848e;\">// Full events!</span>\n timing: { spawnMs, ttfeMs, workMs, totalMs },\n tokenUsage: { inputTokens, outputTokens, costUsd }\n }\n}\n</pre>\n\n<h3 style=\"font-family:sans-serif;color:#98c379;margin:16px 0 12px 0;\">Tested</h3>\n<div style=\"background:#2d2d30;padding:16px;border-radius:6px;border-left:4px solid #98c379;\">\n<p style=\"margin:0;\">✅ Konsole <code>/kontext</code> endpoint returns full kontext with workingHistory<br>\n✅ Services restarted (konui, konsole)<br>\n✅ Commit: <code>d1dfbb5a</code></p>\n</div>\n\n<div style=\"margin-top:20px;padding-top:16px;border-top:1px solid #444;\">\n<p style=\"color:#7f848e;margin:0;font-size:12px;\">Files: konsole/src/main.ts, konsole/src/session.ts, konui/mcp/server.ts, konui/src/console-history.ts, konui/src/router.ts</p>\n</div>\n</div>",
"choices": [
{
"label": "Test get_turn tool",
"value": "Test the konui_get_turn MCP tool with a requestId to verify it returns merged data",
"primary": true
},
{
"label": "View history",
"value": "Open the dashboard console and check if the history prompt display is fixed"
},
{
"label": "Continue work",
"value": "What would you like to work on next?"
}
]
},
"createdBy": "claude",
"createdAt": "2026-01-09T22:38:52.041Z",
"updatedAt": "2026-01-09T22:38:52.246Z",
"scope": "vibetools",
"tags": [
"turn-fidelity",
"mcp",
"kontask",
"kontext"
]
}