337 @param response dictionary containing the version response |
337 @param response dictionary containing the version response |
338 @type dict |
338 @type dict |
339 """ |
339 """ |
340 with contextlib.suppress(KeyError): |
340 with contextlib.suppress(KeyError): |
341 self.serverVersion.emit(response["version"]) |
341 self.serverVersion.emit(response["version"]) |
342 if self.__plugin.getPreferences("OllamaHeartbeatInterval") == 0: |
342 if ( |
343 # implicit connectivity check |
343 self.__plugin.getPreferences("OllamaHeartbeatInterval") == 0 |
|
344 and not self.__serverResponding |
|
345 ): |
|
346 # implicit connectivity check success |
|
347 self.__serverResponding = True |
344 self.serverStateChanged.emit(True, "") |
348 self.serverStateChanged.emit(True, "") |
345 |
349 |
346 def state(self): |
350 def state(self): |
347 """ |
351 """ |
348 Public method to get the current client state. |
352 Public method to get the current client state. |