Skip to content

🐛 Bugfix: exit create mode and select newly created agent after saving#2740

Merged
WMC001 merged 1 commit intodevelopfrom
xyq/bugfix_frontend
Mar 28, 2026
Merged

🐛 Bugfix: exit create mode and select newly created agent after saving#2740
WMC001 merged 1 commit intodevelopfrom
xyq/bugfix_frontend

Conversation

@xuyaqist
Copy link
Copy Markdown
Contributor

@xuyaqist xuyaqist commented Mar 28, 2026

#2737
Bugfix: exit create mode and select newly created agent after saving

When users clicked "Save" in create mode, the interface remained in create mode instead of exiting and selecting the newly created agent. This allowed users to repeatedly click Save and create duplicate agents with the same name.

Changes:

For newly created agents, immediately call setCurrentAgent() after successful save to exit create mode and select the new agent
This ensures isCreatingMode is set to false and the newly created agent is highlighted in the agent list
Update mode behavior remains unchanged

20260328-164121.mp4

Copilot AI review requested due to automatic review settings March 28, 2026 08:34
@xuyaqist xuyaqist changed the title Bugfix: exit create mode and select newly created agent after saving 🐛 Bugfix: exit create mode and select newly created agent after saving Mar 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the agent creation flow so that after a successful “Save” in create mode, the UI exits create mode and selects the newly created agent (preventing repeated saves from creating duplicates).

Changes:

  • On successful create, constructs a minimal Agent object and immediately calls setCurrentAgent() to exit create mode and select the new agent.
  • Keeps tool config batch update + react-query cache invalidation/refetch behavior for both create and update flows.
  • Updates update-mode selection to only set the current agent from refreshed cache when not newly created.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@WMC001 WMC001 merged commit 7123349 into develop Mar 28, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants