Cleanup temp files created by setup_snippet_server */
| 18506 | |
| 18507 | /* Cleanup temp files created by setup_snippet_server */ |
| 18508 | static void cleanup_snippet_dir(const char *tmp_dir) { |
| 18509 | char path[512]; |
| 18510 | snprintf(path, sizeof(path), "%s/project/main.go", tmp_dir); |
| 18511 | unlink(path); |
| 18512 | snprintf(path, sizeof(path), "%s/project", tmp_dir); |
| 18513 | rmdir(path); |
| 18514 | rmdir(tmp_dir); |
| 18515 | } |
| 18516 | |
| 18517 | /* Extract the inner "text" value from an MCP tool result JSON. |
| 18518 | * The MCP envelope is: {"content":[{"type":"text","text":"<inner json>"}]} |