Skip to content

Commit 638c73c

Browse files
committed
fix(EndpointsContextProvider): simplify provider availability check
1 parent 91bb330 commit 638c73c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exts/ext-endpoints/src/233/main/kotlin/cc/unitmesh/endpoints/provider/EndpointsContextProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import com.intellij.spring.mvc.mapping.UrlMappingElement
1313

1414
class EndpointsContextProvider : ChatContextProvider {
1515
override fun isApplicable(project: Project, creationContext: ChatCreationContext): Boolean {
16-
return runReadAction { EndpointsProvider.getAvailableProviders(project).toList() }.isNotEmpty()
16+
return EndpointsProvider.hasAnyProviders()
1717
}
1818

1919
override suspend fun collect(

0 commit comments

Comments
 (0)