Skip to content

Commit

Permalink
Connection settings should have a link to the models
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdjohnson committed Jul 14, 2024
1 parent 65a8eb9 commit a6c6956
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/components/HostInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ const HostInput = observer(({ connection, isEnabled }: HostInputProps) => {

const isDirty = dirtyFields.host

const modelsFoundLabel = isDirty
? 'Save to see model length'
: `${connection.models.length} models found`
const modelsFoundLabel = isDirty ? (
'Save to see model length'
) : (
<button className="link" onClick={() => settingStore.openSettingsModal('models')}>
{connection.models.length} models found
</button>
)

return (
<Controller
Expand All @@ -48,7 +52,7 @@ const HostInput = observer(({ connection, isEnabled }: HostInputProps) => {
>
<Question />
</button>
<span className="ml-auto pl-2">{modelsFoundLabel}</span>
<span className="ml-auto pl-2 text-sm">{modelsFoundLabel}</span>
</span>
}
endContent={
Expand Down

0 comments on commit a6c6956

Please sign in to comment.