feat: have model and version in bottom right

This commit is contained in:
cpacker
2025-12-01 20:00:59 -08:00
parent 2d4fb2cdb6
commit 6260a96f03
2 changed files with 12 additions and 1 deletions

View File

@@ -316,6 +316,10 @@ export default function App({
>(null);
const [llmConfig, setLlmConfig] = useState<LlmConfig | null>(null);
const [agentName, setAgentName] = useState<string | null>(null);
const currentModelLabel =
llmConfig?.model_endpoint_type && llmConfig?.model
? `${llmConfig.model_endpoint_type}/${llmConfig.model}`
: (llmConfig?.model ?? null);
// Agent selector state
const [agentSelectorOpen, setAgentSelectorOpen] = useState(false);
@@ -2737,6 +2741,7 @@ Plan file path: ${planFilePath}`;
interruptRequested={interruptRequested}
agentId={agentId}
agentName={agentName}
currentModel={currentModelLabel}
/>
{/* Model Selector - conditionally mounted as overlay */}

View File

@@ -6,6 +6,7 @@ import { useEffect, useRef, useState } from "react";
import type { PermissionMode } from "../../permissions/mode";
import { permissionMode } from "../../permissions/mode";
import { settingsManager } from "../../settings-manager";
import { getVersion } from "../../version";
import { useTerminalWidth } from "../hooks/useTerminalWidth";
import { colors } from "./colors";
import { InputAssist } from "./InputAssist";
@@ -14,6 +15,7 @@ import { ShimmerText } from "./ShimmerText";
// Type assertion for ink-spinner compatibility
const Spinner = SpinnerLib as ComponentType<{ type?: string }>;
const appVersion = getVersion();
// Only show token count when it exceeds this threshold
const COUNTER_VISIBLE_THRESHOLD = 1000;
@@ -32,6 +34,7 @@ export function Input({
interruptRequested = false,
agentId,
agentName,
currentModel,
}: {
visible?: boolean;
streaming: boolean;
@@ -46,6 +49,7 @@ export function Input({
interruptRequested?: boolean;
agentId?: string;
agentName?: string | null;
currentModel?: string | null;
}) {
const [value, setValue] = useState("");
const [escapePressed, setEscapePressed] = useState(false);
@@ -504,7 +508,9 @@ export function Input({
) : (
<Text dimColor>Press / for commands or @ for files</Text>
)}
<Text dimColor>https://discord.gg/letta</Text>
<Text dimColor>
{`Letta Code v${appVersion} [${currentModel ?? "unknown"}]`}
</Text>
</Box>
</Box>
</Box>