Skip to content

Commit 794dfcf

Browse files
committed
chores
1 parent 01a04fa commit 794dfcf

File tree

1 file changed

+10
-10
lines changed
  • apps/desktop/src/components/settings/ai/llm

1 file changed

+10
-10
lines changed

apps/desktop/src/components/settings/ai/llm/health.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ export function HealthCheckForConnection() {
4242
function useConnectionHealth() {
4343
const model = useLanguageModel();
4444

45-
useEffect(() => {
46-
if (model) {
47-
text.refetch();
48-
}
49-
}, [model]);
50-
51-
if (!model) {
52-
return null;
53-
}
54-
5545
const text = useQuery({
5646
enabled: !!model,
5747
queryKey: ["llm-health-check", model],
@@ -67,6 +57,16 @@ function useConnectionHealth() {
6757
}),
6858
});
6959

60+
useEffect(() => {
61+
if (model) {
62+
text.refetch();
63+
}
64+
}, [model]);
65+
66+
if (!model) {
67+
return null;
68+
}
69+
7070
return text.status;
7171
}
7272

0 commit comments

Comments
 (0)