Phase 3e complete: Agent API Extend (Steps 59, 61-63)
Step 59: WebSocketAgentServer with session management, JSON-RPC routing, MockWebSocketTransport (10/10 tests) Step 61: ASTMutationAPI with setProperty, updateNode, deleteNode, insertNode, journal, OptimizationLock warning (6/6 tests) Step 62: ContextAPI with getInScopeSymbols, getCallHierarchy, getDependencyGraph (6/6 tests) Step 63: BatchMutationAPI with atomic applySequence and reverse-order rollback (5/5 tests) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,19 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
// Remove a child from whatever role it belongs to
|
||||
bool removeChild(ASTNode* child) {
|
||||
for (auto& [role, kids] : children_) {
|
||||
auto it = std::find(kids.begin(), kids.end(), child);
|
||||
if (it != kids.end()) {
|
||||
(*it)->parent = nullptr;
|
||||
kids.erase(it);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
std::map<std::string, std::vector<ASTNode*>> children_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user