agentgui 1.0.715 → 1.0.716

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -156,26 +156,14 @@ class PluginLoader extends EventEmitter {
156
156
 
157
157
  // Topological sort by dependencies
158
158
  topologicalSort() {
159
- const visited = new Set();
160
- const result = [];
161
-
159
+ const visited = new Set(), result = [];
162
160
  const visit = (name) => {
163
161
  if (visited.has(name)) return;
164
162
  visited.add(name);
165
-
166
- const plugin = this.registry.get(name);
167
- for (const dep of (plugin?.dependencies || [])) {
168
- if (this.registry.has(dep)) {
169
- visit(dep);
170
- }
171
- }
163
+ for (const dep of (this.registry.get(name)?.dependencies || [])) { if (this.registry.has(dep)) visit(dep); }
172
164
  result.push(name);
173
165
  };
174
-
175
- for (const name of this.registry.keys()) {
176
- visit(name);
177
- }
178
-
166
+ for (const name of this.registry.keys()) visit(name);
179
167
  return result;
180
168
  }
181
169