feat: profile-based persistence with startup selector (#212)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2025-12-15 11:13:43 -08:00
committed by GitHub
parent 32584fed2d
commit 2f21893ef5
13 changed files with 957 additions and 496 deletions

View File

@@ -84,46 +84,10 @@ export function getAgentStatusHints(
return hints;
}
// For new agents with provenance, show block sources
if (agentProvenance) {
// Blocks reused from existing storage
const reusedGlobalBlocks = agentProvenance.blocks
.filter((b) => b.source === "global")
.map((b) => b.label);
const reusedProjectBlocks = agentProvenance.blocks
.filter((b) => b.source === "project")
.map((b) => b.label);
// New blocks - categorize by where they'll be stored
// (project/skills → .letta/, others → ~/.letta/)
const newBlocks = agentProvenance.blocks.filter((b) => b.source === "new");
const newGlobalBlocks = newBlocks
.filter((b) => b.label !== "project" && b.label !== "skills")
.map((b) => b.label);
const newProjectBlocks = newBlocks
.filter((b) => b.label === "project" || b.label === "skills")
.map((b) => b.label);
if (reusedGlobalBlocks.length > 0) {
hints.push(
`→ Reusing from global (~/.letta/): ${reusedGlobalBlocks.join(", ")}`,
);
}
if (newGlobalBlocks.length > 0) {
hints.push(
`→ Created in global (~/.letta/): ${newGlobalBlocks.join(", ")}`,
);
}
if (reusedProjectBlocks.length > 0) {
hints.push(
`→ Reusing from project (.letta/): ${reusedProjectBlocks.join(", ")}`,
);
}
if (newProjectBlocks.length > 0) {
hints.push(
`→ Created in project (.letta/): ${newProjectBlocks.join(", ")}`,
);
}
// For new agents, just show memory block labels
if (agentProvenance && agentProvenance.blocks.length > 0) {
const blockLabels = agentProvenance.blocks.map((b) => b.label).join(", ");
hints.push(`→ Memory blocks: ${blockLabels}`);
}
return hints;