feat: add TraitsTab component for managing agent traits
CI / build-and-test (push) Failing after -32m5s
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:
@@ -1,66 +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 ModelPublicEmbeddings struct {
|
||||
bun.BaseModel `bun:"table:public.embeddings,alias:embeddings"`
|
||||
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
||||
CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),nullzero," json:"created_at"`
|
||||
Dim int32 `bun:"dim,type:int,notnull," json:"dim"`
|
||||
Embedding resolvespec_common.SqlVector `bun:"embedding,type:vector,notnull," json:"embedding"`
|
||||
GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"`
|
||||
Model resolvespec_common.SqlString `bun:"model,type:text,notnull,unique:uidx_embeddings_thought_id_model," json:"model"`
|
||||
ThoughtID int64 `bun:"thought_id,type:bigint,notnull,unique:uidx_embeddings_thought_id_model," json:"thought_id"`
|
||||
UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),nullzero," json:"updated_at"`
|
||||
RelThoughtID *ModelPublicThoughts `bun:"rel:has-one,join:thought_id=id" json:"relthoughtid,omitempty"` // Has one ModelPublicThoughts
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicEmbeddings
|
||||
func (m ModelPublicEmbeddings) TableName() string {
|
||||
return "public.embeddings"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicEmbeddings
|
||||
func (m ModelPublicEmbeddings) TableNameOnly() string {
|
||||
return "embeddings"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicEmbeddings
|
||||
func (m ModelPublicEmbeddings) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetID returns the primary key value
|
||||
func (m ModelPublicEmbeddings) GetID() int64 {
|
||||
return m.ID.Int64()
|
||||
}
|
||||
|
||||
// GetIDStr returns the primary key as a string
|
||||
func (m ModelPublicEmbeddings) GetIDStr() string {
|
||||
return fmt.Sprintf("%v", m.ID)
|
||||
}
|
||||
|
||||
// SetID sets the primary key value
|
||||
func (m ModelPublicEmbeddings) SetID(newid int64) {
|
||||
m.UpdateID(newid)
|
||||
}
|
||||
|
||||
// UpdateID updates the primary key value
|
||||
func (m *ModelPublicEmbeddings) UpdateID(newid int64) {
|
||||
m.ID.FromString(fmt.Sprintf("%d", newid))
|
||||
}
|
||||
|
||||
// GetIDName returns the name of the primary key column
|
||||
func (m ModelPublicEmbeddings) GetIDName() string {
|
||||
return "id"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicEmbeddings) GetPrefix() string {
|
||||
return "EMB"
|
||||
}
|
||||
Reference in New Issue
Block a user