chore: allow renaming agent (#83)

Co-authored-by: Shubham Naik <shub@memgpt.ai>
This commit is contained in:
Shubham Naik
2025-11-07 20:48:12 -08:00
committed by GitHub
parent d762859963
commit eab04aaee3
5 changed files with 90 additions and 2 deletions

View File

@@ -12,10 +12,12 @@ const commandList = Object.entries(commands).map(([cmd, { desc }]) => ({
export function CommandPreview({
currentInput,
agentId,
agentName,
serverUrl,
}: {
currentInput: string;
agentId?: string;
agentName?: string | null;
serverUrl?: string;
}) {
if (!currentInput.startsWith("/")) {
@@ -40,7 +42,14 @@ export function CommandPreview({
</Box>
))}
{showBottomBar && (
<Box marginTop={1} paddingTop={1} borderTop borderColor="gray">
<Box
marginTop={1}
paddingTop={1}
borderTop
borderColor="gray"
flexDirection="column"
>
{agentName && <Text dimColor>Agent: {agentName}</Text>}
{isCloudUser ? (
<Link url={`https://app.letta.com/agents/${agentId}`}>
<Text dimColor>View agent in ADE</Text>

View File

@@ -7,6 +7,7 @@ interface InputAssistProps {
onFileSelect: (path: string) => void;
onAutocompleteActiveChange: (isActive: boolean) => void;
agentId?: string;
agentName?: string | null;
serverUrl?: string;
}
@@ -22,6 +23,7 @@ export function InputAssist({
onFileSelect,
onAutocompleteActiveChange,
agentId,
agentName,
serverUrl,
}: InputAssistProps) {
// Show file autocomplete when @ is present
@@ -42,6 +44,7 @@ export function InputAssist({
<CommandPreview
currentInput={currentInput}
agentId={agentId}
agentName={agentName}
serverUrl={serverUrl}
/>
);

View File

@@ -31,6 +31,7 @@ export function Input({
onInterrupt,
interruptRequested = false,
agentId,
agentName,
}: {
visible?: boolean;
streaming: boolean;
@@ -44,6 +45,7 @@ export function Input({
onInterrupt?: () => void;
interruptRequested?: boolean;
agentId?: string;
agentName?: string | null;
}) {
const [value, setValue] = useState("");
const [escapePressed, setEscapePressed] = useState(false);
@@ -478,6 +480,7 @@ export function Input({
onFileSelect={handleFileSelect}
onAutocompleteActiveChange={setIsAutocompleteActive}
agentId={agentId}
agentName={agentName}
serverUrl={serverUrl}
/>