chore: add link to add models section from formatting settings
This commit is contained in:
parent
e636781640
commit
2a18525626
2 changed files with 22 additions and 23 deletions
|
|
@ -253,7 +253,10 @@ export default function SyncModelsDialog({
|
|||
).map((model) => (
|
||||
<div
|
||||
key={model.id}
|
||||
className="flex items-start space-x-3 p-4 border rounded-lg hover:bg-muted/30 transition-colors"
|
||||
className="flex items-start space-x-3 p-4 border rounded-lg hover:bg-muted/30 transition-colors cursor-pointer"
|
||||
onClick={() =>
|
||||
toggleModel(model.id, !selectedModels.includes(model.id))
|
||||
}
|
||||
>
|
||||
<Checkbox
|
||||
id={model.id}
|
||||
|
|
@ -261,15 +264,13 @@ export default function SyncModelsDialog({
|
|||
onCheckedChange={(checked) =>
|
||||
toggleModel(model.id, !!checked)
|
||||
}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="mt-1"
|
||||
/>
|
||||
<div className="grid gap-1.5 leading-none flex-1">
|
||||
<label
|
||||
htmlFor={model.id}
|
||||
className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer"
|
||||
>
|
||||
<span className="text-sm font-medium leading-none cursor-pointer">
|
||||
{model.name}
|
||||
</label>
|
||||
</span>
|
||||
<div className="flex gap-2 text-xs text-muted-foreground">
|
||||
{model.size && <span>Size: {model.size}</span>}
|
||||
<span>Context: {model.context}</span>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { Button } from "@/components/ui/button";
|
|||
import { Switch } from "@/components/ui/switch";
|
||||
import { Plus } from "lucide-react";
|
||||
import { Link } from "@tanstack/react-router";
|
||||
import { cn } from "@/lib/utils";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
|
|
@ -90,6 +89,17 @@ export function FormattingSettings() {
|
|||
</Tooltip>
|
||||
</div>
|
||||
|
||||
<Link
|
||||
to="/settings/ai-models"
|
||||
search={{ tab: "language" }}
|
||||
className="inline-block"
|
||||
>
|
||||
<Button variant="link" className="text-xs px-0">
|
||||
<Plus className="w-4 h-4" />
|
||||
Manage language models
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
{formattingEnabled && (
|
||||
<div className="mt-6 border-border border rounded-md p-4">
|
||||
<div className="space-y-4">
|
||||
|
|
@ -114,22 +124,10 @@ export function FormattingSettings() {
|
|||
</Link>
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
<DefaultModelCombobox
|
||||
modelType="language"
|
||||
title="Default Language Model"
|
||||
/>
|
||||
<Link
|
||||
to="/settings/ai-models"
|
||||
search={{ tab: "language" }}
|
||||
className="inline-block"
|
||||
>
|
||||
<Button variant="link" className="text-xs px-0">
|
||||
<Plus className="w-4 h-4" />
|
||||
Manage language models
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
<DefaultModelCombobox
|
||||
modelType="language"
|
||||
title="Default Language Model"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue