feat(server): add brand kit management and project binding
Add a brand kit domain with memory and postgres stores, a BrandKitService for CRUD and resolution, and REST endpoints to list, upsert, and delete brand kits. Projects can bind a brand kit whose resolved context and reference images feed into the agent's long-term memory and design prompts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"img_infinite_canvas/internal/domain/brandkit"
|
||||
"img_infinite_canvas/internal/types"
|
||||
)
|
||||
|
||||
func toAPIBrandKit(kit brandkit.Kit) types.BrandKit {
|
||||
return types.BrandKit{
|
||||
Id: kit.ID,
|
||||
Name: kit.Name,
|
||||
Document: string(kit.Document),
|
||||
IsDefault: kit.IsDefault,
|
||||
CreatedAt: formatTime(kit.CreatedAt),
|
||||
UpdatedAt: formatTime(kit.UpdatedAt),
|
||||
}
|
||||
}
|
||||
|
||||
func toAPIBrandKits(kits []brandkit.Kit) []types.BrandKit {
|
||||
items := make([]types.BrandKit, 0, len(kits))
|
||||
for _, kit := range kits {
|
||||
items = append(items, toAPIBrandKit(kit))
|
||||
}
|
||||
return items
|
||||
}
|
||||
Reference in New Issue
Block a user