fix(jetbrains): map custom provider delete action to disconnect

- Route ProviderListAction.DELETE through the existing disconnect() handler
  so the trash-icon action actually removes the custom provider
- Add the missing settings.providers.delete bundle key referenced by
  ProviderListRows
- Preset a default id/name/URL when adding a new custom provider without an
  existing config to edit
This commit is contained in:
kirillk
2026-07-15 17:26:21 -04:00
parent cae3270c9d
commit 03a72e8f9f
3 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
"@kilocode/kilo-jetbrains": patch
---
Support editing custom OpenAI-compatible providers from JetBrains settings, keep added or edited providers selected, and close the custom provider dialog after a successful save.
Support editing custom OpenAI-compatible providers from JetBrains settings and replace their Disconnect action with Edit and Delete. Added or edited providers stay selected, and the custom provider dialog now closes after a successful save.
@@ -548,6 +548,7 @@ internal class ProvidersContent(
ProviderListAction.CONNECT -> connect(row.provider)
ProviderListAction.OAUTH -> oauth(row.provider)
ProviderListAction.DISCONNECT -> disconnect(row.provider)
ProviderListAction.DELETE -> disconnect(row.provider)
ProviderListAction.ENABLE -> enable(row.provider)
ProviderListAction.EDIT -> edit(row.provider)
}
@@ -661,7 +662,7 @@ internal class CustomProviderDialog(
)
init()
initValidation()
existing?.let { prefill(it) }
existing?.let { prefill(it) } ?: preset()
models.document.addDocumentListener(object : DocumentAdapter() {
override fun textChanged(e: DocumentEvent) {
syncActions()
@@ -674,6 +675,14 @@ internal class CustomProviderDialog(
syncActions()
}
@RequiresEdt
private fun preset() {
checkEdt()
id.text = "Anaconda"
name.text = "Anaconda"
url.text = "http://127.0.0.1:8080"
}
@RequiresEdt
private fun prefill(edit: CustomProviderEdit) {
checkEdt()
@@ -455,6 +455,7 @@ settings.providers.oauth.waitingTimed=Waiting for authorization... ({0})
settings.providers.oauth.cancel=Cancel
settings.providers.disconnect=Disconnect
settings.providers.edit=Edit
settings.providers.delete=Delete
settings.providers.enable=Enable
settings.providers.badge.env=env
settings.providers.note.kilo=Access 500+ AI models