feat: add TraitsTab component for managing agent traits
Some checks failed
CI / build-and-test (push) Failing after -32m5s
Some checks failed
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:
@@ -80,6 +80,15 @@ func TestResolveSpecGuardAllowsSupportedMutations(t *testing.T) {
|
||||
{name: "agent_guardrails create", entity: "agent_guardrails", operation: "create"},
|
||||
{name: "agent_guardrails update", entity: "agent_guardrails", operation: "update"},
|
||||
{name: "agent_guardrails delete", entity: "agent_guardrails", operation: "delete"},
|
||||
{name: "agent_personas create", entity: "agent_personas", operation: "create"},
|
||||
{name: "agent_personas update", entity: "agent_personas", operation: "update"},
|
||||
{name: "agent_personas delete", entity: "agent_personas", operation: "delete"},
|
||||
{name: "agent_parts create", entity: "agent_parts", operation: "create"},
|
||||
{name: "agent_parts update", entity: "agent_parts", operation: "update"},
|
||||
{name: "agent_parts delete", entity: "agent_parts", operation: "delete"},
|
||||
{name: "agent_traits create", entity: "agent_traits", operation: "create"},
|
||||
{name: "agent_traits update", entity: "agent_traits", operation: "update"},
|
||||
{name: "agent_traits delete", entity: "agent_traits", operation: "delete"},
|
||||
{name: "stored_files update", entity: "stored_files", operation: "update"},
|
||||
{name: "stored_files delete", entity: "stored_files", operation: "delete"},
|
||||
}
|
||||
@@ -171,3 +180,27 @@ func TestResolveSpecModelsIncludeLearnings(t *testing.T) {
|
||||
}
|
||||
t.Fatal("resolveSpecModels() missing public.learnings")
|
||||
}
|
||||
|
||||
func TestResolveSpecModelsIncludePersonaEntities(t *testing.T) {
|
||||
models := resolveSpecModels()
|
||||
required := map[string]bool{
|
||||
"agent_personas": false,
|
||||
"agent_parts": false,
|
||||
"agent_traits": false,
|
||||
}
|
||||
|
||||
for _, model := range models {
|
||||
if model.schema != "public" {
|
||||
continue
|
||||
}
|
||||
if _, ok := required[model.entity]; ok {
|
||||
required[model.entity] = true
|
||||
}
|
||||
}
|
||||
|
||||
for entity, found := range required {
|
||||
if !found {
|
||||
t.Fatalf("resolveSpecModels() missing public.%s", entity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user