feat: add TraitsTab component for managing agent traits
CI / build-and-test (push) Failing after -32m5s

- Implemented TraitsTab.svelte to handle CRUD operations for agent traits.
- Integrated grid for displaying traits with context menu actions for add, edit, and delete.
- Added trait instruction editing functionality with a dedicated editor.
- Updated AdminShell to include PersonasPage for navigation.
- Enhanced AppSidebar with a new entry for Personas.
- Extended ShellPage type to include 'personas'.
- Defined new types for AgentPersona, AgentPart, and AgentTrait in types.ts.
This commit is contained in:
2026-05-05 14:51:58 +02:00
parent e285a03639
commit 9230f39cb6
48 changed files with 6979 additions and 2240 deletions
@@ -1,64 +0,0 @@
// Code generated by relspecgo. DO NOT EDIT.
package generatedmodels
import (
"fmt"
resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes"
"github.com/uptrace/bun"
)
type ModelPublicPersonaArc struct {
bun.BaseModel `bun:"table:public.persona_arc,alias:persona_arc"`
PersonaID int64 `bun:"persona_id,type:bigint,pk," json:"persona_id"`
ArcID int64 `bun:"arc_id,type:bigint,notnull," json:"arc_id"`
CurrentStageID int64 `bun:"current_stage_id,type:bigint,notnull," json:"current_stage_id"`
UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"`
RelArcID *ModelPublicCharacterArcs `bun:"rel:has-one,join:arc_id=id" json:"relarcid,omitempty"` // Has one ModelPublicCharacterArcs
RelCurrentStageID *ModelPublicArcStages `bun:"rel:has-one,join:current_stage_id=id" json:"relcurrentstageid,omitempty"` // Has one ModelPublicArcStages
RelPersonaID *ModelPublicAgentPersonas `bun:"rel:has-one,join:persona_id=id" json:"relpersonaid,omitempty"` // Has one ModelPublicAgentPersonas
}
// TableName returns the table name for ModelPublicPersonaArc
func (m ModelPublicPersonaArc) TableName() string {
return "public.persona_arc"
}
// TableNameOnly returns the table name without schema for ModelPublicPersonaArc
func (m ModelPublicPersonaArc) TableNameOnly() string {
return "persona_arc"
}
// SchemaName returns the schema name for ModelPublicPersonaArc
func (m ModelPublicPersonaArc) SchemaName() string {
return "public"
}
// GetID returns the primary key value
func (m ModelPublicPersonaArc) GetID() int64 {
return int64(m.PersonaID)
}
// GetIDStr returns the primary key as a string
func (m ModelPublicPersonaArc) GetIDStr() string {
return fmt.Sprintf("%d", m.PersonaID)
}
// SetID sets the primary key value
func (m ModelPublicPersonaArc) SetID(newid int64) {
m.UpdateID(newid)
}
// UpdateID updates the primary key value
func (m *ModelPublicPersonaArc) UpdateID(newid int64) {
m.PersonaID = newid
}
// GetIDName returns the name of the primary key column
func (m ModelPublicPersonaArc) GetIDName() string {
return "persona_id"
}
// GetPrefix returns the table prefix
func (m ModelPublicPersonaArc) GetPrefix() string {
return "PAE"
}