feat(ui): refactor IM channels list layout and form\n\n- Change IM channel form from dialog to drawer for better UX\n- Convert channel list from vertical layout to responsive grid cards\n- Move edit/delete actions into a dropdown menu for cleaner card design\n- Replace platform radio group with a select dropdown in the add channel form

This commit is contained in:
wizardchen
2026-04-29 17:04:51 +08:00
committed by lyingbug
parent c62ff4c906
commit da90867dd4
6 changed files with 182 additions and 66 deletions
+7 -3
View File
@@ -213,9 +213,13 @@ func (h *Handler) setupStopEventHandler(
eventBus.On(event.EventStop, func(ctx context.Context, evt event.Event) error {
logger.Infof(ctx, "Received stop event, cancelling async operations for session: %s", sessionID)
cancel()
assistantMessage.Content = "用户停止了本次对话"
// Use session's tenant for message update (ctx may have effectiveTenantID when using shared agent)
updateCtx := context.WithValue(ctx, types.TenantIDContextKey, sessionTenantID)
// Preserve whatever has been streamed so far; do not overwrite Content.
// Use session's tenant for message update (ctx may have effectiveTenantID when using shared agent).
// Use WithoutCancel so the GORM UPDATE survives the upcoming ctx.Done triggered by cancel()/client disconnect.
updateCtx := context.WithValue(
context.WithoutCancel(ctx),
types.TenantIDContextKey, sessionTenantID,
)
h.completeAssistantMessage(updateCtx, assistantMessage, "") // empty query: stopped conversations are not indexed
return nil
})