Skip to content

Commit 9b7943f

Browse files
committed
fix(translator): prevent connection attempt to Ollama when translation is disabled
1 parent 4c159f1 commit 9b7943f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entrypoints/content/composables/useTranslator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ async function _useTranslator() {
6969
})
7070

7171
registerContentScriptRpcEvent('contextMenuClicked', async (e) => {
72-
if (userConfig.llm.endpointType.get() === 'ollama') {
72+
if (!enabled.value && userConfig.llm.endpointType.get() === 'ollama') {
7373
if (!(await ollamaStatusStore.updateConnectionStatus())) {
7474
toast('Failed to connect to Ollama server, please check your Ollama connection', { duration: 2000 })
7575
showSettings(true, 'server-address-section')

0 commit comments

Comments
 (0)