Merge pull request #4263 from continuedev/dallin/jetbrains-inline-edit

Increase Jetbrains InlineEdit model titles timeout
This commit is contained in:
Nate Sesti 2025-02-21 09:55:53 -08:00 • committed by GitHub
commit a26c922f51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -137,7 +137,10 @@ fun openInlineEdit(project: Project?, editor: Editor) {
modelTitles.addAll(models.map { it["title"] as String })
}
val maxWaitTime = 200
// This is a hacky way to not complicate getting model titles with coroutines
// 1500 feels like way upper limit of "would be weird if panel showed up after that long"
// And should always allow enough time to load config
val maxWaitTime = 1500
val startTime = System.currentTimeMillis()
while (modelTitles.isEmpty() && System.currentTimeMillis() - startTime < maxWaitTime) {
Thread.sleep(20)