mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-02 11:52:38 +02:00
bugfix: deleting agent does not delete connections
This commit is contained in:
parent
8c16243c2c
commit
92a7b66db3
1 changed files with 4 additions and 0 deletions
|
|
@ -316,6 +316,10 @@ function reducer(state: State, action: Action): State {
|
||||||
draft.workflow.agents = draft.workflow.agents.filter(
|
draft.workflow.agents = draft.workflow.agents.filter(
|
||||||
(agent) => agent.name !== action.name
|
(agent) => agent.name !== action.name
|
||||||
);
|
);
|
||||||
|
draft.workflow.agents = draft.workflow.agents.map(agent => ({
|
||||||
|
...agent,
|
||||||
|
connectedAgents: agent.connectedAgents.filter(connectedAgent => connectedAgent !== action.name)
|
||||||
|
}));
|
||||||
draft.selection = null;
|
draft.selection = null;
|
||||||
draft.pendingChanges = true;
|
draft.pendingChanges = true;
|
||||||
draft.chatKey++;
|
draft.chatKey++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue