Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions apps/maple-research/frontend/src/components/ModelSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,17 @@ export function ModelSelector({
const elements: React.ReactNode[] = [];

if (selectedModel) {
elements.push(selectedModel.display_name || selectedModel.short_name || modelId);
elements.push(
<span key="name" className="truncate">
{selectedModel.display_name || selectedModel.short_name || modelId}
</span>
);

const badges = getModelBadges(modelId);
if (badges && badges.length > 0) {
badges.forEach((badge, index) => {
let badgeClass = "rounded-md px-1.5 py-0.5 text-[10px] font-medium";
let badgeClass =
"shrink-0 whitespace-nowrap rounded-md px-1.5 py-0.5 text-[10px] font-medium leading-4";

if (badge === "Coming Soon") {
badgeClass += " bg-muted text-muted-foreground";
Expand All @@ -327,41 +332,42 @@ export function ModelSelector({
}

if (showLock && !hasAccessToModel(modelId)) {
elements.push(<Lock key="lock" className="h-3 w-3 opacity-50" />);
elements.push(<Lock key="lock" className="h-3 w-3 shrink-0 opacity-50" />);
}
} else {
elements.push(getDisplayNameText(modelId));
}

return <span className="flex items-center gap-1">{elements}</span>;
return <span className="flex min-w-0 items-center gap-1">{elements}</span>;
};

// Show current category or model name in the collapsed view
const modelDisplay = (
<div className="flex items-center gap-1">
<div className="text-xs font-medium">{getDisplayLabel(model)}</div>
</div>
<span className="truncate text-xs font-medium">{getDisplayLabel(model)}</span>
);

// Always show dropdown even with single model (it may be loading more)

return (
<>
<DropdownMenu modal={false}>
{/* The chip counts as 5rem when the composer row wraps, grows up to the
full name when there is room, and truncates instead of pushing the
other controls onto a new row. */}
<DropdownMenuTrigger asChild>
<Button
disabled={disabled}
variant="ghost"
size="sm"
className="h-8 gap-1 px-2 text-[hsl(var(--maple-secondary-700))] hover:bg-[hsl(var(--maple-primary-container))] hover:text-[hsl(var(--maple-secondary-700))]"
className="h-8 min-w-0 max-w-max grow basis-20 gap-1 px-2 text-[hsl(var(--maple-secondary-700))] hover:bg-[hsl(var(--maple-primary-container))] hover:text-[hsl(var(--maple-secondary-700))]"
data-testid="model-selector-button"
aria-label={`Current model: ${getDisplayNameText(model)}. Click to change model.`}
>
{modelDisplay}
<ChevronDown className="h-3 w-3" />
<ChevronDown className="h-3 w-3 shrink-0" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="w-64 p-0">
<DropdownMenuContent align="start" className="w-80 p-0">
{!showAdvanced ? (
<div className="p-1 flex flex-col">
{/* Primary options */}
Expand Down Expand Up @@ -497,10 +503,12 @@ export function ModelSelector({
}`}
disabled={effectivelyDisabled}
>
<div className="flex items-center gap-2 flex-1">
<div className="text-sm">{getDisplayName(availableModel.id, true)}</div>
<div className="flex min-w-0 flex-1 items-center gap-2">
<div className="min-w-0 text-sm">
{getDisplayName(availableModel.id, true)}
</div>
</div>
{isActive && <Check className="h-4 w-4" />}
{isActive && <Check className="ml-2 h-4 w-4 shrink-0" />}
</DropdownMenuItem>
);
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface PromoDialogProps {
const PROMO_BENEFITS = [
{
icon: <Cpu className="h-4 w-4" />,
text: "Powerful AI models including Gemma 4 31B, GLM 5.3, and Kimi K2.6"
text: "Powerful AI models including Gemma 4 31B, GLM 5.3, and Kimi K3"
},
{
icon: <Image className="h-4 w-4" />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function UpgradePromptDialog({
benefits: [
"Images stay private with end-to-end encryption",
"Upload JPEG, PNG, and WebP formats securely",
"Use Gemma 4 31B and Kimi K2.6 on Pro and above",
"Use Gemma 4 31B and Kimi K3 on Pro and above",
"Analyze diagrams, screenshots, and photos privately",
"Extract text from images without exposing data"
]
Expand Down Expand Up @@ -159,7 +159,7 @@ export function UpgradePromptDialog({
: isPro
? [
"10x more monthly messages with Max plan",
"Access to all AI models including GLM 5.3 and Kimi K2.6",
"Access to all AI models including GLM 5.3 and Kimi K3",
"Highest priority during peak times",
"Maximum rate limits for power users",
"Or purchase extra credits to keep chatting now"
Expand Down Expand Up @@ -207,7 +207,7 @@ export function UpgradePromptDialog({
requiredPlan: "Pro",
benefits: [
"All models run in secure, encrypted environments",
"Access to GLM 5.3, Kimi K2.6, and the full model lineup",
"Access to GLM 5.3, Kimi K3, and the full model lineup",
"OpenAI GPT-OSS, Gemma, and other advanced models",
"Higher token limits for longer conversations",
"Priority access to new models as they launch"
Expand Down Expand Up @@ -285,7 +285,7 @@ export function UpgradePromptDialog({
{isFreeTier
? "Plus access to powerful models, image & document processing, and more"
: isPro
? "Plus access to GLM 5.3, Kimi K2.6, 10x more usage, API access, and priority support"
? "Plus access to GLM 5.3, Kimi K3, 10x more usage, API access, and priority support"
: "Explore our pricing options for the best plan for your needs"}
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ export function ThinkingLevelSelector({
<BrainCog
className={`h-4 w-4 ${isDefault ? "" : "text-[hsl(var(--maple-primary))]"}`}
/>
{!isDefault && <span className="text-xs font-medium">{currentLabel}</span>}
{/* Phones keep the tinted icon only so the model name has room. */}
{!isDefault && (
<span className="hidden text-xs font-medium sm:inline">{currentLabel}</span>
)}
</Button>
</DropdownMenuTrigger>
</ComposerHoverTooltip>
Expand Down
8 changes: 4 additions & 4 deletions apps/maple-research/frontend/src/config/pricingConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const PRICING_PLANS: PricingPlan[] = [
icon: <X className="w-4 h-4 text-maple-error" />
},
{
text: "Paid AI models including Gemma 4 31B, GLM 5.3, and Kimi K2.6",
text: "Paid AI models including Gemma 4 31B, GLM 5.3, and Kimi K3",
included: false,
icon: <X className="w-4 h-4 text-maple-error" />
},
Expand Down Expand Up @@ -97,7 +97,7 @@ export const PRICING_PLANS: PricingPlan[] = [
icon: <Check className="w-4 h-4 text-maple-success" />
},
{
text: "All AI models including GLM 5.3 and Kimi K2.6",
text: "All AI models including GLM 5.3 and Kimi K3",
included: true,
icon: <Check className="w-4 h-4 text-maple-success" />
},
Expand Down Expand Up @@ -151,7 +151,7 @@ export const PRICING_PLANS: PricingPlan[] = [
icon: <Check className="w-4 h-4 text-maple-success" />
},
{
text: "All AI models including GLM 5.3 and Kimi K2.6",
text: "All AI models including GLM 5.3 and Kimi K3",
included: true,
icon: <Check className="w-4 h-4 text-maple-success" />
},
Expand Down Expand Up @@ -214,7 +214,7 @@ export const PRICING_PLANS: PricingPlan[] = [
icon: <Check className="w-4 h-4 text-maple-success" />
},
{
text: "All AI models including GLM 5.3 and Kimi K2.6",
text: "All AI models including GLM 5.3 and Kimi K3",
included: true,
icon: <Check className="w-4 h-4 text-maple-success" />
},
Expand Down
Loading