Merge pull request #8561 from Kilo-Org/recover/pr-7981

fix(vscode): fall back to generic "Try Model" for long model names
This commit is contained in:
Mark IJbema
2026-04-08 10:21:20 +02:00
committed by GitHub
20 changed files with 27 additions and 2 deletions
@@ -62,12 +62,16 @@ export const KiloNotifications: Component = () => {
return true
})
const MAX_NAME = 30
const suggestedName = createMemo(() => {
const suggestion = suggestedModel()
if (!suggestion) return undefined
const model = provider.findModel(suggestion)
if (!model?.name) return undefined
return stripSubProviderPrefix(model.name)
const name = stripSubProviderPrefix(model.name)
if (name.length > MAX_NAME) return undefined
return name
})
const handleTryModel = () => {
@@ -98,7 +102,9 @@ export const KiloNotifications: Component = () => {
<div class="kilo-notifications-cta-group">
<Show when={canSwitchModel()}>
<button class="kilo-notifications-action-btn" onClick={handleTryModel}>
{language.t("notifications.action.tryModel", { model: suggestedName() ?? "" })}
{suggestedName()
? language.t("notifications.action.tryModel", { model: suggestedName()! })
: language.t("notifications.action.tryModelGeneric")}
</button>
</Show>
<Show when={current()?.action}>
+1
View File
@@ -1334,4 +1334,5 @@ export const dict = {
"notifications.action.next": "التالي",
"notifications.action.close": "إغلاق",
"notifications.action.tryModel": "جرّب {{model}}",
"notifications.action.tryModelGeneric": "جرّب النموذج",
}
+1
View File
@@ -1363,4 +1363,5 @@ export const dict = {
"notifications.action.next": "Próximo",
"notifications.action.close": "Fechar",
"notifications.action.tryModel": "Experimentar {{model}}",
"notifications.action.tryModelGeneric": "Experimentar modelo",
}
+1
View File
@@ -1359,4 +1359,5 @@ export const dict = {
"notifications.action.next": "Sljedeći",
"notifications.action.close": "Zatvori",
"notifications.action.tryModel": "Probaj {{model}}",
"notifications.action.tryModelGeneric": "Probaj model",
}
+1
View File
@@ -1350,4 +1350,5 @@ export const dict = {
"notifications.action.next": "Næste",
"notifications.action.close": "Luk",
"notifications.action.tryModel": "Prøv {{model}}",
"notifications.action.tryModelGeneric": "Prøv model",
}
+1
View File
@@ -1377,4 +1377,5 @@ export const dict = {
"notifications.action.next": "Weiter",
"notifications.action.close": "Schließen",
"notifications.action.tryModel": "{{model}} ausprobieren",
"notifications.action.tryModelGeneric": "Modell ausprobieren",
} satisfies Partial<Record<Keys, string>>
@@ -1361,4 +1361,5 @@ export const dict = {
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try {{model}}",
"notifications.action.tryModelGeneric": "Try Model",
}
+1
View File
@@ -1366,4 +1366,5 @@ export const dict = {
"notifications.action.next": "Siguiente",
"notifications.action.close": "Cerrar",
"notifications.action.tryModel": "Probar {{model}}",
"notifications.action.tryModelGeneric": "Probar modelo",
}
+1
View File
@@ -1382,4 +1382,5 @@ export const dict = {
"notifications.action.next": "Suivant",
"notifications.action.close": "Fermer",
"notifications.action.tryModel": "Essayer {{model}}",
"notifications.action.tryModelGeneric": "Essayer le modèle",
}
+1
View File
@@ -1349,4 +1349,5 @@ export const dict = {
"notifications.action.next": "次へ",
"notifications.action.close": "閉じる",
"notifications.action.tryModel": "{{model}}を試す",
"notifications.action.tryModelGeneric": "モデルを試す",
}
+1
View File
@@ -1337,4 +1337,5 @@ export const dict = {
"notifications.action.next": "다음",
"notifications.action.close": "닫기",
"notifications.action.tryModel": "{{model}} 시도",
"notifications.action.tryModelGeneric": "모델 시도",
}
+1
View File
@@ -1355,6 +1355,7 @@ export const dict = {
"notifications.action.next": "Volgende",
"notifications.action.close": "Sluiten",
"notifications.action.tryModel": "Probeer {{model}}",
"notifications.action.tryModelGeneric": "Probeer model",
// Missing translations - English fallbacks until translated
"settings.agentBehaviour.createMode": "Nieuwe modus aanmaken",
"settings.agentBehaviour.createMode.button": "Aanmaken",
+1
View File
@@ -1348,4 +1348,5 @@ export const dict = {
"notifications.action.next": "Neste",
"notifications.action.close": "Lukk",
"notifications.action.tryModel": "Prøv {{model}}",
"notifications.action.tryModelGeneric": "Prøv modell",
} satisfies Partial<Record<Keys, string>>
+1
View File
@@ -1358,4 +1358,5 @@ export const dict = {
"notifications.action.next": "Następny",
"notifications.action.close": "Zamknij",
"notifications.action.tryModel": "Wypróbuj {{model}}",
"notifications.action.tryModelGeneric": "Wypróbuj model",
}
+1
View File
@@ -1357,4 +1357,5 @@ export const dict = {
"notifications.action.next": "Далее",
"notifications.action.close": "Закрыть",
"notifications.action.tryModel": "Попробовать {{model}}",
"notifications.action.tryModelGeneric": "Попробовать модель",
}
+1
View File
@@ -1333,4 +1333,5 @@ export const dict = {
"notifications.action.next": "ถัดไป",
"notifications.action.close": "ปิด",
"notifications.action.tryModel": "ลองใช้ {{model}}",
"notifications.action.tryModelGeneric": "ลองใช้โมเดล",
}
+1
View File
@@ -1347,6 +1347,7 @@ export const dict = {
"notifications.action.next": "Sonraki",
"notifications.action.close": "Kapat",
"notifications.action.tryModel": "Dene {{model}}",
"notifications.action.tryModelGeneric": "Modeli Dene",
// Missing translations - English fallbacks until translated
"profile.switchingAccount": "Hesap değiştiriliyor…",
"settings.agentBehaviour.createMode": "Yeni Mod Oluştur",
+1
View File
@@ -1348,6 +1348,7 @@ export const dict = {
"notifications.action.next": "Далі",
"notifications.action.close": "Закрити",
"notifications.action.tryModel": "Спробувати {{model}}",
"notifications.action.tryModelGeneric": "Спробувати модель",
// Missing translations - English fallbacks until translated
"profile.switchingAccount": "Перемикання акаунту…",
"settings.agentBehaviour.createMode": "Створити новий режим",
+1
View File
@@ -1308,4 +1308,5 @@ export const dict = {
"notifications.action.next": "下一个",
"notifications.action.close": "关闭",
"notifications.action.tryModel": "尝试 {{model}}",
"notifications.action.tryModelGeneric": "尝试模型",
} satisfies Partial<Record<Keys, string>>
+1
View File
@@ -1311,4 +1311,5 @@ export const dict = {
"notifications.action.next": "下一個",
"notifications.action.close": "關閉",
"notifications.action.tryModel": "嘗試 {{model}}",
"notifications.action.tryModelGeneric": "嘗試模型",
} satisfies Partial<Record<Keys, string>>