mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-29 03:32:08 +08:00
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:
@@ -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.
|
||||
|
||||
+10
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user