feat: add /palace alias for Memory Palace (#1088)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-02-21 13:34:02 -08:00
committed by GitHub
parent 7efef92dfd
commit 5ad7094a26
2 changed files with 49 additions and 2 deletions

View File

@@ -6224,7 +6224,7 @@ export default function App({
return { submitted: true };
}
// Special handling for /memory command - opens memory viewer
// Special handling for /memory command - opens memory viewer overlay
if (trimmed === "/memory") {
startOverlayCommand(
"memory",
@@ -6236,6 +6236,44 @@ export default function App({
return { submitted: true };
}
// /palace - open Memory Palace directly in the browser (skips TUI overlay)
if (trimmed === "/palace") {
const cmd = commandRunner.start(
"/palace",
"Opening Memory Palace...",
);
if (!settingsManager.isMemfsEnabled(agentId)) {
cmd.finish(
"Memory Palace requires memfs. Run /memfs enable first.",
false,
);
return { submitted: true };
}
const { generateAndOpenMemoryViewer } = await import(
"../web/generate-memory-viewer"
);
generateAndOpenMemoryViewer(agentId, {
agentName: agentName ?? undefined,
})
.then((result) => {
if (result.opened) {
cmd.finish("Opened Memory Palace in browser", true);
} else {
cmd.finish(`Open manually: ${result.filePath}`, true);
}
})
.catch((err: unknown) => {
cmd.finish(
`Failed to open: ${err instanceof Error ? err.message : String(err)}`,
false,
);
});
return { submitted: true };
}
// Special handling for /mcp command - manage MCP servers
if (msg.trim().startsWith("/mcp")) {
const mcpCtx: McpCommandContext = {

View File

@@ -74,6 +74,15 @@ export const commands: Record<string, Command> = {
return "Opening memory viewer...";
},
},
"/palace": {
desc: "Open the Memory Palace in your browser",
order: 16,
noArgs: true,
handler: () => {
// Handled specially in App.tsx - opens browser directly
return "Opening Memory Palace...";
},
},
"/sleeptime": {
desc: "Configure reflection reminder trigger settings",
order: 15.5,
@@ -94,7 +103,7 @@ export const commands: Record<string, Command> = {
},
"/search": {
desc: "Search messages across all agents (/search [query])",
order: 16,
order: 15.1,
handler: () => {
// Handled specially in App.tsx to show message search
return "Opening message search...";