feat: show /reload hint next to switch provider button in Kimi Code tab

This commit is contained in:
KimiSwitch Dev
2026-07-09 00:06:03 +08:00
parent baa28b4df5
commit 43b7ad18d0
+12 -1
View File
@@ -1,5 +1,5 @@
import { useTranslation } from "../i18n"; import { useTranslation } from "../i18n";
import type { Model, Provider } from "../types"; import type { Agent, Model, Provider } from "../types";
interface ProviderListProps { interface ProviderListProps {
providers: Provider[]; providers: Provider[];
@@ -9,6 +9,7 @@ interface ProviderListProps {
onDelete: (name: string) => void; onDelete: (name: string) => void;
onAdd: () => void; onAdd: () => void;
onSwitchProvider: (name: string) => void; onSwitchProvider: (name: string) => void;
agent: Agent;
} }
const PROVIDER_ICONS: Record<string, string> = { const PROVIDER_ICONS: Record<string, string> = {
@@ -54,6 +55,7 @@ export function ProviderList({
onDelete, onDelete,
onAdd, onAdd,
onSwitchProvider, onSwitchProvider,
agent,
}: ProviderListProps) { }: ProviderListProps) {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
@@ -163,6 +165,15 @@ export function ProviderList({
> >
{isActive ? t("inUse") : t("switchTo")} {isActive ? t("inUse") : t("switchTo")}
</button> </button>
{agent === "kimi_code" && (
<span
className="text-sm text-gray-500 hover:text-gray-300 cursor-help select-none"
title={t("switchReloadHint")}
aria-label={t("switchReloadHint")}
>
</span>
)}
<button <button
type="button" type="button"
onClick={(e) => { onClick={(e) => {