diff --git a/src/cli/components/ModelSelector.tsx b/src/cli/components/ModelSelector.tsx index 0d32123..a76a5ae 100644 --- a/src/cli/components/ModelSelector.tsx +++ b/src/cli/components/ModelSelector.tsx @@ -599,7 +599,7 @@ export function ModelSelector({ Swap your agent's model - {!isLoading && !refreshing && ( + {!isLoading && ( {renderTabBar()} {getCategoryDescription(category)} @@ -622,12 +622,6 @@ export function ModelSelector({ )} - {refreshing && ( - - Refreshing models... - - )} - {error && ( @@ -647,60 +641,68 @@ export function ModelSelector({ )} {/* Model list */} + {refreshing && ( + + Refreshing list... + + )} - {visibleModels.map((model, index) => { - const actualIndex = startIndex + index; - const isSelected = actualIndex === selectedIndex; - const isCurrent = model.id === currentModelId; - // Show lock for non-free models when on free tier (only for Letta API tabs) - const showLock = - isFreeTier && - !model.free && - (category === "supported" || category === "all"); + {!refreshing && + visibleModels.map((model, index) => { + const actualIndex = startIndex + index; + const isSelected = actualIndex === selectedIndex; + const isCurrent = model.id === currentModelId; + // Show lock for non-free models when on free tier (only for Letta API tabs) + const showLock = + isFreeTier && + !model.free && + (category === "supported" || category === "all"); - return ( - - - {isSelected ? "> " : " "} - - {showLock && 🔒 } - - {model.label} - {isCurrent && (current)} - - {model.description && ( - · {model.description} - )} - - ); - })} - {showScrollDown ? ( + return ( + + + {isSelected ? "> " : " "} + + {showLock && 🔒 } + + {model.label} + {isCurrent && (current)} + + {model.description && ( + · {model.description} + )} + + ); + })} + {!refreshing && showScrollDown ? ( {" "}↓ {itemsBelow} more below - ) : currentList.length > visibleCount ? ( + ) : !refreshing && currentList.length > visibleCount ? ( ) : null} {/* Footer */} - {!isLoading && !refreshing && currentList.length > 0 && ( + {!isLoading && currentList.length > 0 && ( {" "} {currentList.length} models{isCached ? " · cached" : ""} · R to - refresh availability + refresh list {" "}Enter select · ↑↓ navigate · ←→/Tab switch · Esc cancel