Closed moppman closed 9 months ago
Got it. I need to move the API check immediately after retrieving the host option from the local storage. The same needs to happen on the Options
page as well. Thanks for bringing this up!
New information... Developers don't have control over emitted network error messages from Chome, but they can be hidden: https://stackoverflow.com/questions/4500741/suppress-chrome-failed-to-load-resource-messages-in-console
Either way, there are still some changes to be made to catch explicit errors originating from the extension.
Hi Andrew,
in the extension's console log, I'm seeing a
Failed to load resource: net::ERR_CONNECTION_REFUSED
error for thehttp://localhost:11434/api/tags
route every time I open the Lumos popup. That's because my Ollama instance is running on another host in the network and not onlocalhost
. I've set the correct host in the options menu, and Lumos is working as expected otherwise.I think we're seeing some kind of data race originating from here: https://github.com/andrewnguonly/Lumos/blob/e34cf7cdca9a2d79dc61762a97d3cb0be53ee5ef/src/components/ChatBar.tsx#L274
My guess: when the popup opens,
selectedHost
is still set toDEFAULT_HOST
becausesetSelectedHost
hasn't updated it fromlocalStorage
yet.This is on Lumos v1.0.7.
Thanks for your work on this cool extension!