From b7244ffa88473df8d45eaa06b05a88f72df1df21 Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Sat, 31 Jan 2026 21:53:16 -0800 Subject: [PATCH] feat(cli): add alien art to command preview and exit message (#769) Co-authored-by: Letta --- src/cli/App.tsx | 51 ++++++++++++----- src/cli/commands/registry.ts | 2 +- src/cli/components/AgentInfoBar.tsx | 56 ++++++++++--------- .../components/SlashCommandAutocomplete.tsx | 2 +- src/cli/components/Text.tsx | 1 - 5 files changed, 69 insertions(+), 43 deletions(-) diff --git a/src/cli/App.tsx b/src/cli/App.tsx index e05f8d4..b7fc2e8 100644 --- a/src/cli/App.tsx +++ b/src/cli/App.tsx @@ -9802,23 +9802,44 @@ Plan file path: ${planFilePath}`; stats: sessionStatsRef.current.getSnapshot(), })} - Resume this agent with: - - {/* Show -n "name" if agent has name and is pinned, otherwise --agent */} - {agentName && - (settingsManager.getLocalPinnedAgents().includes(agentId) || - settingsManager.getGlobalPinnedAgents().includes(agentId)) - ? `letta -n "${agentName}"` - : `letta --agent ${agentId}`} - + {/* Alien + Resume commands */} + + {" ▗▖▗▖ "} + Resume this agent with: + + + {"▙█▜▛█▟ "} + + {/* Show -n "name" if agent has name and is pinned, otherwise --agent */} + {agentName && + (settingsManager.getLocalPinnedAgents().includes(agentId) || + settingsManager.getGlobalPinnedAgents().includes(agentId)) + ? `letta -n "${agentName}"` + : `letta --agent ${agentId}`} + + {/* Only show conversation hint if not on default (default is resumed automatically) */} - {conversationId !== "default" && ( + {conversationId !== "default" ? ( <> - - Resume this conversation with: - - {`letta --conv ${conversationId}`} - + + {"▝▜▛▜▛▘ "} + Resume this conversation with: + + + {" ▀ ▀ "} + + {`letta --conv ${conversationId}`} + + + + ) : ( + <> + + {"▝▜▛▜▛▘ "} + + + {" ▀ ▀ "} + )} diff --git a/src/cli/commands/registry.ts b/src/cli/commands/registry.ts index 3d367a0..9354b36 100644 --- a/src/cli/commands/registry.ts +++ b/src/cli/commands/registry.ts @@ -46,7 +46,7 @@ export const commands: Record = { }, "/skill": { desc: "Enter skill creation mode (/skill [description])", - order: 14, + order: 28, // Advanced feature, moved below visible commands handler: () => { // Handled specially in App.tsx to trigger skill-creation workflow return "Starting skill creation..."; diff --git a/src/cli/components/AgentInfoBar.tsx b/src/cli/components/AgentInfoBar.tsx index 77fdac0..5efc3f7 100644 --- a/src/cli/components/AgentInfoBar.tsx +++ b/src/cli/components/AgentInfoBar.tsx @@ -43,32 +43,30 @@ export const AgentInfoBar = memo(function AgentInfoBar({ return null; } + // Alien ASCII art lines (4 lines tall, with 2-char indent + extra space before text) + const alienLines = [" ▗▖▗▖ ", " ▙█▜▛█▟ ", " ▝▜▛▜▛▘ ", " ▀ ▀ "]; + return ( {/* Blank line after commands */} - {/* Discord/version info */} + {/* Version and Discord/feedback info */} - {" "}Having issues? Report bugs with /feedback or{" "} + {" "}Letta Code v{getVersion()} · Report bugs with /feedback or{" "} join our Discord ↗ - - - {" "}Version: Letta Code v{getVersion()} - - {/* Blank line before agent info */} - {/* Agent name and links */} + {/* Alien + Agent name */} - {" "} + {alienLines[0]} {agentName || "Unnamed"} @@ -79,35 +77,43 @@ export const AgentInfoBar = memo(function AgentInfoBar({ ) : ( (type /pin to pin agent) )} + + + {/* Alien + Links */} + + {alienLines[1]} {isCloudUser && adeUrl && !isTmux && ( <> - · Open in ADE ↗ + · )} {isCloudUser && adeUrl && isTmux && ( - · Open in ADE: {adeUrl} + Open in ADE: {adeUrl} · )} {isCloudUser && ( - <> - · - - View usage ↗ - - + + View usage ↗ + )} - {!isCloudUser && · {serverUrl}} + {!isCloudUser && {serverUrl}} - {/* Agent ID and conversation ID on separate line */} + + {/* Alien + Agent ID */} - - {" "} - {agentId} - - {conversationId && conversationId !== "default" && ( - · {conversationId} + {alienLines[2]} + {agentId} + + + {/* Alien + Conversation ID */} + + {alienLines[3]} + {conversationId && conversationId !== "default" ? ( + {conversationId} + ) : ( + default conversation )} diff --git a/src/cli/components/SlashCommandAutocomplete.tsx b/src/cli/components/SlashCommandAutocomplete.tsx index 20f12ce..ad5055d 100644 --- a/src/cli/components/SlashCommandAutocomplete.tsx +++ b/src/cli/components/SlashCommandAutocomplete.tsx @@ -6,7 +6,7 @@ import { AutocompleteBox, AutocompleteItem } from "./Autocomplete"; import { Text } from "./Text"; import type { AutocompleteProps, CommandMatch } from "./types/autocomplete"; -const VISIBLE_COMMANDS = 8; // Number of commands visible at once +const VISIBLE_COMMANDS = 7; // Number of commands visible at once // Compute filtered command list (excluding hidden commands), sorted by order const _allCommands: CommandMatch[] = Object.entries(commands) diff --git a/src/cli/components/Text.tsx b/src/cli/components/Text.tsx index 0fd0ebe..7a62baf 100644 --- a/src/cli/components/Text.tsx +++ b/src/cli/components/Text.tsx @@ -46,7 +46,6 @@ function looksLikeMojibake(value: string): boolean { ) { sawUtf8Sequence = true; i += 3; - continue; } } }