mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-07 12:18:44 +02:00
fix: preserve editable pattern graphs
Add mode-aware graph mutation helpers for pattern topology so backend code can add and remove agents without forcing a full graph rebuild. Also preserve an existing pattern graph in savePattern instead of re-syncing it from defaults, and cover the new behavior with shared and main-process tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -345,7 +345,7 @@ export class AryxAppService extends EventEmitter<AppServiceEvents> {
|
||||
async savePattern(pattern: PatternDefinition): Promise<WorkspaceState> {
|
||||
const workspace = await this.loadWorkspace();
|
||||
const knownApprovalToolNames = await this.listKnownApprovalToolNames(workspace);
|
||||
const synchronizedPattern = syncPatternGraph(pattern);
|
||||
const synchronizedPattern = pattern.graph ? pattern : syncPatternGraph(pattern);
|
||||
const issues = validatePatternDefinition(
|
||||
synchronizedPattern,
|
||||
knownApprovalToolNames,
|
||||
|
||||
Reference in New Issue
Block a user