feat(integrations): polish embed/IM channel editors and agent rebind

Align embed channel setup with a step wizard, simplify deploy layout,
and allow changing bound agents on update for embed and IM channels.
This commit is contained in:
wizardchen
2026-06-24 19:27:39 +08:00
committed by lyingbug
parent 2d6d1e3275
commit 635d7c9643
17 changed files with 1002 additions and 669 deletions
@@ -177,6 +177,12 @@ func (s *embedChannelService) Update(
ch.AllowedOrigins = req.AllowedOrigins
}
}
if trimmed := strings.TrimSpace(req.AgentID); trimmed != "" && trimmed != ch.AgentID {
if _, err := s.ensureAgentOwned(ctx, tenantID, trimmed); err != nil {
return nil, err
}
ch.AgentID = trimmed
}
if err := s.repo.Update(ctx, ch); err != nil {
return nil, err
}