Sprint 2 Step 24: Orchestrator spawns Emacs

This commit is contained in:
Bill
2026-02-06 22:15:46 -07:00
parent 00a5c8430d
commit 5f0c74dec2
4 changed files with 73 additions and 0 deletions

View File

@@ -251,6 +251,18 @@ json processRequest(const json& request) {
});
}
}
else if (method == "sendToEmacs") {
try {
std::string command = request.at("params").at("command");
std::string result = g_orchestrator->sendToEmacs(command);
response["result"] = result;
} catch (...) {
response["error"] = json::object({
{"code", -32600},
{"message", "Invalid parameters for sendToEmacs"}
});
}
}
else {
response["error"] = json::object({
{"code", -32601},
@@ -400,6 +412,9 @@ int main(int argc, char* argv[]) {
// Create orchestrator
g_orchestrator = std::make_unique<Orchestrator>();
// Start the Emacs daemon
g_orchestrator->startEmacsDaemon();
// Load the AST from the specified file
if (!g_orchestrator->loadAST(filePath)) {
std::cerr << "Failed to load AST from: " << filePath << std::endl;