From a70badff6b6c4706ef9d3e2d1bef17e5f64b9d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E6=A5=BD=E5=9D=82=C2=B7=E5=96=B5?= Date: Sat, 6 Dec 2025 15:42:10 +0800 Subject: [PATCH] docs: add commet to warn disabled timeout Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/services/code-index/embedders/ollama.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/code-index/embedders/ollama.ts b/src/services/code-index/embedders/ollama.ts index b611c55d71..23a90c4e5f 100644 --- a/src/services/code-index/embedders/ollama.ts +++ b/src/services/code-index/embedders/ollama.ts @@ -78,6 +78,8 @@ export class CodeIndexOllamaEmbedder implements IEmbedder { // Add timeout to prevent indefinite hanging const controller = new AbortController() let embeddingTimeoutId = undefined + // If embeddingTimeoutMs <= 0, the timeout is disabled and requests may hang indefinitely. + // To enable the timeout, set embeddingTimeoutMs to a positive integer (milliseconds). if (this.embeddingTimeoutMs > 0) { embeddingTimeoutId = setTimeout(() => controller.abort(), this.embeddingTimeoutMs) }