From 6d833abfc0206049b9b31303132c79f7748d9508 Mon Sep 17 00:00:00 2001 From: jacentsao Date: Mon, 10 Aug 2026 11:07:42 +0800 Subject: [PATCH] fix(im): persist session mode configuration --- internal/handler/im.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/handler/im.go b/internal/handler/im.go index 64268fa5..50995879 100644 --- a/internal/handler/im.go +++ b/internal/handler/im.go @@ -65,6 +65,7 @@ func (h *IMHandler) CreateIMChannel(c *gin.Context) { Name string `json:"name"` Mode string `json:"mode"` OutputMode string `json:"output_mode"` + SessionMode string `json:"session_mode"` KnowledgeBaseID string `json:"knowledge_base_id"` Credentials types.JSON `json:"credentials"` Enabled *bool `json:"enabled"` @@ -86,6 +87,7 @@ func (h *IMHandler) CreateIMChannel(c *gin.Context) { Name: req.Name, Mode: req.Mode, OutputMode: req.OutputMode, + SessionMode: req.SessionMode, KnowledgeBaseID: req.KnowledgeBaseID, Credentials: req.Credentials, Enabled: true, @@ -207,6 +209,7 @@ func (h *IMHandler) UpdateIMChannel(c *gin.Context) { Name *string `json:"name"` Mode *string `json:"mode"` OutputMode *string `json:"output_mode"` + SessionMode *string `json:"session_mode"` KnowledgeBaseID *string `json:"knowledge_base_id"` Credentials types.JSON `json:"credentials"` Enabled *bool `json:"enabled"` @@ -226,6 +229,9 @@ func (h *IMHandler) UpdateIMChannel(c *gin.Context) { if req.OutputMode != nil { channel.OutputMode = *req.OutputMode } + if req.SessionMode != nil { + channel.SessionMode = *req.SessionMode + } if req.KnowledgeBaseID != nil { channel.KnowledgeBaseID = *req.KnowledgeBaseID }