Cleanup temp files created by setup_snippet_server */
| 2763 | |
| 2764 | /* Cleanup temp files created by setup_snippet_server */ |
| 2765 | static void cleanup_snippet_dir(const char *tmp_dir) { |
| 2766 | char path[512]; |
| 2767 | snprintf(path, sizeof(path), "%s/project/main.go", tmp_dir); |
| 2768 | unlink(path); |
| 2769 | snprintf(path, sizeof(path), "%s/project", tmp_dir); |
| 2770 | rmdir(path); |
| 2771 | rmdir(tmp_dir); |
| 2772 | } |
| 2773 | |
| 2774 | /* Extract the inner "text" value from an MCP tool result JSON. |
| 2775 | * The MCP envelope is: {"content":[{"type":"text","text":"<inner json>"}]} |