MCPcopy
hub / github.com/Zleap-AI/SAG / formatModelName

Function formatModelName

web/src/App.tsx:4034–4038  ·  view source on GitHub ↗
(model: string | null | undefined, t: (zh: string, en: string) => string)

Source from the content-addressed store, hash-verified

4032}
4033
4034function formatModelName(model: string | null | undefined, t: (zh: string, en: string) => string) {
4035 if (!model) return t("未知模型", "Unknown model");
4036 if (model === "local-rule-fallback") return t("本地规则回退", "Local rule fallback");
4037 return model;
4038}
4039
4040function formatMessageRole(role: string, t: (zh: string, en: string) => string) {
4041 if (role === "user") return t("用户", "User");

Callers 1

ConversationWorkspaceFunction · 0.85

Calls 1

tFunction · 0.85

Tested by

no test coverage detected