diff --git a/src/main/kotlin/ee/carlrobert/codegpt/agent/clients/CustomOpenAILLMClient.kt b/src/main/kotlin/ee/carlrobert/codegpt/agent/clients/CustomOpenAILLMClient.kt index 81835a68..03a13098 100644 --- a/src/main/kotlin/ee/carlrobert/codegpt/agent/clients/CustomOpenAILLMClient.kt +++ b/src/main/kotlin/ee/carlrobert/codegpt/agent/clients/CustomOpenAILLMClient.kt @@ -32,10 +32,7 @@ import kotlin.io.encoding.ExperimentalEncodingApi public class CustomOpenAIClientSettings( baseUrl: String, chatCompletionsPath: String, - timeoutConfig: ConnectionTimeoutConfig = ConnectionTimeoutConfig( - requestTimeoutMillis = 120_000, - socketTimeoutMillis = 120_000 - ) + timeoutConfig: ConnectionTimeoutConfig ) : OpenAIBaseSettings(baseUrl, chatCompletionsPath, timeoutConfig) /** diff --git a/src/main/kotlin/ee/carlrobert/codegpt/agent/tools/IntelliJSearchTool.kt b/src/main/kotlin/ee/carlrobert/codegpt/agent/tools/IntelliJSearchTool.kt index 4189276b..d0b894b2 100644 --- a/src/main/kotlin/ee/carlrobert/codegpt/agent/tools/IntelliJSearchTool.kt +++ b/src/main/kotlin/ee/carlrobert/codegpt/agent/tools/IntelliJSearchTool.kt @@ -127,10 +127,14 @@ class IntelliJSearchTool( override suspend fun execute(args: Args): Result { try { - val searchScope = createSearchScope(args, project) - val effectiveLimit = (args.limit ?: 10).coerceAtLeast(1) - val matches = - withContext(Dispatchers.Default) { runReadAction { searchEverywhere(args.pattern, searchScope, effectiveLimit) } } + val (searchScope, matches) = withContext(Dispatchers.Default) { + runReadAction { + val scope = createSearchScope(args, project) + val effectiveLimit = (args.limit ?: 10).coerceAtLeast(1) + val results = searchEverywhere(args.pattern, scope, effectiveLimit) + scope to results + } + } val output = formatOutput(matches, args) return Result(