Merge pull request #7971 from Kilo-Org/session/agent_ab4d50f6-2609-4d1d-97fd-d24b2ba5c30d

fix(vscode): show friendly model name in notification "Try model" button
This commit is contained in:
Christiaan Arnoldus
2026-03-31 11:31:47 +02:00
committed by GitHub
19 changed files with 28 additions and 19 deletions
@@ -6,6 +6,7 @@ import { useProvider } from "../../context/provider"
import { useLanguage } from "../../context/language"
import { KILO_PROVIDER_ID } from "../../../../src/shared/provider-model"
import { TelemetryEventName } from "../../../../src/services/telemetry/types"
import { stripSubProviderPrefix } from "../shared/model-selector-utils"
export const KiloNotifications: Component = () => {
const { filteredNotifications, dismiss } = useNotifications()
@@ -61,6 +62,14 @@ export const KiloNotifications: Component = () => {
return true
})
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 handleTryModel = () => {
const suggestion = suggestedModel()
if (!suggestion) return
@@ -88,7 +97,7 @@ export const KiloNotifications: Component = () => {
<div class="kilo-notifications-footer">
<Show when={canSwitchModel()}>
<button class="kilo-notifications-action-btn" onClick={handleTryModel}>
{language.t("notifications.action.tryModel")}
{language.t("notifications.action.tryModel", { model: suggestedName() ?? "" })}
</button>
</Show>
<Show when={current()?.action}>
+1 -1
View File
@@ -1282,5 +1282,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1311,5 +1311,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1307,5 +1307,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1298,5 +1298,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1325,5 +1325,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
} satisfies Partial<Record<Keys, string>>
@@ -1310,5 +1310,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1315,5 +1315,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1328,5 +1328,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1297,5 +1297,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1285,5 +1285,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1303,5 +1303,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1296,5 +1296,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
} satisfies Partial<Record<Keys, string>>
+1 -1
View File
@@ -1306,5 +1306,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1305,5 +1305,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1281,5 +1281,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1295,5 +1295,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
}
+1 -1
View File
@@ -1258,5 +1258,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
} satisfies Partial<Record<Keys, string>>
+1 -1
View File
@@ -1261,5 +1261,5 @@ export const dict = {
"notifications.action.previous": "Previous",
"notifications.action.next": "Next",
"notifications.action.close": "Close",
"notifications.action.tryModel": "Try model",
"notifications.action.tryModel": "Try {{model}}",
} satisfies Partial<Record<Keys, string>>