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:
@@ -38,13 +38,14 @@ func (r *ProjectRepository) List(ctx context.Context) ([]design.ProjectSummary,
|
||||
continue
|
||||
}
|
||||
items = append(items, design.ProjectSummary{
|
||||
ID: project.ID,
|
||||
UserID: project.UserID,
|
||||
Title: project.Title,
|
||||
Brief: project.Brief,
|
||||
Status: project.Status,
|
||||
Thumbnail: project.Thumbnail,
|
||||
UpdatedAt: project.UpdatedAt,
|
||||
ID: project.ID,
|
||||
UserID: project.UserID,
|
||||
Title: project.Title,
|
||||
Brief: project.Brief,
|
||||
Status: project.Status,
|
||||
Thumbnail: project.Thumbnail,
|
||||
BrandKitID: project.BrandKitID,
|
||||
UpdatedAt: project.UpdatedAt,
|
||||
})
|
||||
}
|
||||
return items, nil
|
||||
@@ -207,6 +208,7 @@ func repositoryUserID(ctx context.Context, userID string) string {
|
||||
|
||||
func cloneProject(project design.Project) design.Project {
|
||||
project.UserID = repositoryUserID(context.Background(), project.UserID)
|
||||
project.BrandImages = append([]string(nil), project.BrandImages...)
|
||||
project.Nodes = append([]design.Node(nil), project.Nodes...)
|
||||
project.Connections = append([]design.Connection(nil), project.Connections...)
|
||||
project.Messages = append([]design.Message(nil), project.Messages...)
|
||||
|
||||
Reference in New Issue
Block a user