Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

1.5 KB
Raw Blame
import type { TranslationKey } from '@/i18n/types';
import * as React from "react";
import { useTranslation } from "react-i18next";
import { getBackendUiMeta } from "@/lib/agentBackends";

import type { SupplyGap } from "./types";

export const GuardGapList: React.FC<{ gaps: SupplyGap[]; labelKey?: TranslationKey }> = ({
  gaps,
  labelKey = "settings.models.guard.gap.label",
}) => {
  const { t, i18n } = useTranslation();
  if (gaps.length === 0) return null;
  return (
    <>
      <div className="model-hub-guard-label">
        <p>{t(labelKey)}</p>
        <span>
          {t("settings.models.gateway.modelCount", { count: gaps.length })}
        </span>
      </div>
      <div className="model-hub-guard-list">
        {gaps.map((gap) => (
          <div
            key={`${gap.backend}:${gap.model_id}`}
            className="model-hub-guard-hop"
          >
            <span className="min-w-0 flex-1">
              <strong>
                {t("settings.models.guard.gap.subject", {
                  backend: getBackendUiMeta(gap.backend).label,
                  menuModel: gap.model_id,
                })}
              </strong>
              {gap.agents.length > 0 && (
                <span>
                  {t("settings.models.guard.gap.agents", {
                    agents: gap.agents.join(
                      i18n.language.startsWith("zh") ? "、" : ", ",
                    ),
                  })}
                </span>
              )}
            </span>
          </div>
        ))}
      </div>
    </>
  );
};