We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01a04fa commit 794dfcfCopy full SHA for 794dfcf
apps/desktop/src/components/settings/ai/llm/health.tsx
@@ -42,16 +42,6 @@ export function HealthCheckForConnection() {
42
function useConnectionHealth() {
43
const model = useLanguageModel();
44
45
- useEffect(() => {
46
- if (model) {
47
- text.refetch();
48
- }
49
- }, [model]);
50
-
51
- if (!model) {
52
- return null;
53
54
55
const text = useQuery({
56
enabled: !!model,
57
queryKey: ["llm-health-check", model],
@@ -67,6 +57,16 @@ function useConnectionHealth() {
67
}),
68
58
});
69
59
60
+ useEffect(() => {
61
+ if (model) {
62
+ text.refetch();
63
+ }
64
+ }, [model]);
65
+
66
+ if (!model) {
+ return null;
70
return text.status;
71
}
72
0 commit comments