feat: add TraitsTab component for managing agent traits
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:
2026-05-05 14:51:58 +02:00
parent e285a03639
commit 9230f39cb6
48 changed files with 6979 additions and 2240 deletions

View File

@@ -56,7 +56,7 @@ export type NavItem = {
disabled?: boolean;
};
export type ShellPage = 'dashboard' | 'projects' | 'thoughts' | 'learnings' | 'plans' | 'skills' | 'guardrails' | 'files' | 'maintenance';
export type ShellPage = 'dashboard' | 'projects' | 'thoughts' | 'learnings' | 'plans' | 'skills' | 'guardrails' | 'personas' | 'files' | 'maintenance';
export type Project = {
id: string;
@@ -139,6 +139,52 @@ export type AgentGuardrail = {
updated_at: string;
};
export type AgentPersona = {
id: string;
name: string;
description: string;
summary: string;
detail: string;
compiled_summary: string;
compiled_detail: string;
compiled_at?: string;
tags: string[];
created_at: string;
updated_at: string;
};
export type AgentPart = {
id: string;
name: string;
part_type: string;
description: string;
summary: string;
content: string;
tags: string[];
created_at: string;
updated_at: string;
};
export type AgentTrait = {
id: string;
name: string;
trait_type: string;
description: string;
instruction: string;
tags: string[];
created_at: string;
updated_at: string;
};
export type CharacterArc = {
id: string;
name: string;
description: string;
summary: string;
created_at: string;
updated_at: string;
};
export type StoredFile = {
id: string;
thought_id?: string;