Skip to content

Commit b2c9912

Browse files
committed
Auto enter edit mode afet copy the agent
1 parent b759e96 commit b2c9912

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

frontend/app/[locale]/agents/components/AgentSetupOrchestrator.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,6 +1930,13 @@ export default function AgentSetupOrchestrator({
19301930
return;
19311931
}
19321932
const newAgentId = Number(createResult.data.agent_id);
1933+
const copiedAgentFallback: Agent = {
1934+
...detail,
1935+
id: String(newAgentId),
1936+
name: copyName,
1937+
display_name: copyDisplayName,
1938+
sub_agent_id_list: subAgentIds,
1939+
};
19331940

19341941
// Copy tool configuration to the new agent
19351942
for (const tool of tools) {
@@ -1969,6 +1976,8 @@ export default function AgentSetupOrchestrator({
19691976
})
19701977
);
19711978
}
1979+
// Auto select the newly copied agent for editing
1980+
await handleEditAgent(copiedAgentFallback, t);
19721981
} catch (error) {
19731982
log.error("Failed to copy agent:", error);
19741983
message.error(t("agentConfig.agents.copyFailed"));

0 commit comments

Comments
 (0)