mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-03 09:11:59 +08:00
### Summary This PR fixes a Go backend bug where updating agent settings, such as description, could clear the agent DSL. Root cause: PUT /api/v1/agents/:canvas_id only bound the dsl field in Go. When the frontend submitted settings without dsl, the service still updated the canvas with an empty DSL value. Changes: - Treat agent updates as partial patches. - Preserve existing DSL when dsl is not present in the request. - Update only specified user_canvas fields instead of saving the full row. - Add a regression test for settings updates preserving DSL. Test: `go test ./internal/service ./internal/handler` Co-authored-by: Zhichang Yu <yuzhichang@gmail.com>