Files
ragflow/internal
euvre b4540672e4 fix(go): seed built-in agent templates for Go backend (#16666)
### Summary

The Go backend never seeded the `canvas_template` table, so the "Create
agent from template" page was blank when the frontend proxies to the Go
API (`API_PROXY_SCHEME=go`). This PR adds `SeedCanvasTemplates()` in
`internal/dao`, invoked from `InitDB()` after migrations, which loads
`agent/templates/*.json` and mirrors Python's `add_graph_templates()`
behavior.

Changes:
- Add `internal/dao/canvas_template_seed.go` to parse and upsert
built-in templates.
- Call `SeedCanvasTemplates()` in `InitDB()`.
- Add `CanvasTypes` (`JSONSlice`) to `entity.CanvasTemplate` so the
frontend can filter/group by category.
- Skip seeding gracefully when the templates directory is absent.

This fixes the blank template catalogue in Go mode.
2026-07-07 11:25:53 +08:00
..
2026-07-06 18:14:05 +08:00
2026-07-05 20:45:35 +08:00
2026-07-02 09:45:01 +08:00
2026-07-06 10:58:40 +08:00
2026-07-03 15:08:37 +08:00