feat: 添加LLM模型清单、命令执行记录录制和LLM请求记录录制功能

This commit is contained in:
lornlee committed 2026-07-30 15:18:40 +08:00
1 parent 0f94849012
commit 5b58330f01
14 files changed
+1546 -197

No files matched your search

+39 -179
View File
@@ -1,185 +1,45 @@
import {
DM_Sans,
Figtree,
Geist,
Geist_Mono,
Inter,
JetBrains_Mono,
Lora,
Merriweather,
Noto_Sans,
Noto_Serif,
Nunito_Sans,
Outfit,
Playfair_Display,
Public_Sans,
Raleway,
Roboto,
Roboto_Slab,
} from "next/font/google";
// TEMPORARY: offline build fallback — uses local Geist fonts instead of Google Fonts.
// Restore registry.ts.bak after build.
import localFont from "next/font/local";
import { GeistPixelSquare } from "geist/font/pixel";
const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
});
const notoSans = Noto_Sans({
subsets: ["latin"],
variable: "--font-noto-sans",
});
const roboto = Roboto({
subsets: ["latin"],
weight: ["400", "500", "700"],
variable: "--font-roboto",
});
const geist = Geist({
subsets: ["latin"],
variable: "--font-geist",
});
const outfit = Outfit({
subsets: ["latin"],
variable: "--font-outfit",
});
const geistMono = Geist_Mono({
subsets: ["latin"],
variable: "--font-geist-mono",
});
const dmSans = DM_Sans({
subsets: ["latin"],
variable: "--font-dm-sans",
});
const nunitoSans = Nunito_Sans({
subsets: ["latin"],
variable: "--font-nunito-sans",
});
const figtree = Figtree({
subsets: ["latin"],
variable: "--font-figtree",
});
const raleway = Raleway({
subsets: ["latin"],
variable: "--font-raleway",
});
const publicSans = Public_Sans({
subsets: ["latin"],
variable: "--font-public-sans",
});
const jetBrainsMono = JetBrains_Mono({
subsets: ["latin"],
variable: "--font-jetbrains-mono",
});
const notoSerif = Noto_Serif({
subsets: ["latin"],
variable: "--font-noto-serif",
});
const robotoSlab = Roboto_Slab({
subsets: ["latin"],
variable: "--font-roboto-slab",
});
const merriweather = Merriweather({
subsets: ["latin"],
weight: ["400", "700"],
variable: "--font-merriweather",
});
const lora = Lora({
subsets: ["latin"],
variable: "--font-lora",
});
const playfairDisplay = Playfair_Display({
subsets: ["latin"],
variable: "--font-playfair-display",
});
const geist = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-geist" });
const inter = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-inter" });
const notoSans = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-noto-sans" });
const roboto = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-roboto" });
const outfit = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-outfit" });
const dmSans = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-dm-sans" });
const nunitoSans = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-nunito-sans" });
const figtree = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-figtree" });
const raleway = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-raleway" });
const publicSans = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-public-sans" });
const notoSerif = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-noto-serif" });
const robotoSlab = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-roboto-slab" });
const merriweather = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-merriweather" });
const lora = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-lora" });
const playfairDisplay = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2", variable: "--font-playfair-display" });
const geistMono = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-mono/GeistMono-Variable.woff2", variable: "--font-geist-mono" });
const jetBrainsMono = localFont({ src: "../../../node_modules/geist/dist/fonts/geist-mono/GeistMono-Variable.woff2", variable: "--font-jetbrains-mono" });
export const fontRegistry = {
geist: {
label: "Geist",
font: geist,
},
inter: {
label: "Inter",
font: inter,
},
notoSans: {
label: "Noto Sans",
font: notoSans,
},
nunitoSans: {
label: "Nunito Sans",
font: nunitoSans,
},
figtree: {
label: "Figtree",
font: figtree,
},
roboto: {
label: "Roboto",
font: roboto,
},
raleway: {
label: "Raleway",
font: raleway,
},
dmSans: {
label: "DM Sans",
font: dmSans,
},
publicSans: {
label: "Public Sans",
font: publicSans,
},
outfit: {
label: "Outfit",
font: outfit,
},
geistMono: {
label: "Geist Mono",
font: geistMono,
},
geistPixelSquare: {
label: "Geist Pixel Square",
font: GeistPixelSquare,
},
jetBrainsMono: {
label: "JetBrains Mono",
font: jetBrainsMono,
},
notoSerif: {
label: "Noto Serif",
font: notoSerif,
},
robotoSlab: {
label: "Roboto Slab",
font: robotoSlab,
},
merriweather: {
label: "Merriweather",
font: merriweather,
},
lora: {
label: "Lora",
font: lora,
},
playfairDisplay: {
label: "Playfair Display",
font: playfairDisplay,
},
geist: { label: "Geist", font: geist },
inter: { label: "Inter", font: inter },
notoSans: { label: "Noto Sans", font: notoSans },
nunitoSans: { label: "Nunito Sans", font: nunitoSans },
figtree: { label: "Figtree", font: figtree },
roboto: { label: "Roboto", font: roboto },
raleway: { label: "Raleway", font: raleway },
dmSans: { label: "DM Sans", font: dmSans },
publicSans: { label: "Public Sans", font: publicSans },
outfit: { label: "Outfit", font: outfit },
geistMono: { label: "Geist Mono", font: geistMono },
geistPixelSquare: { label: "Geist Pixel Square", font: GeistPixelSquare },
jetBrainsMono: { label: "JetBrains Mono", font: jetBrainsMono },
notoSerif: { label: "Noto Serif", font: notoSerif },
robotoSlab: { label: "Roboto Slab", font: robotoSlab },
merriweather: { label: "Merriweather", font: merriweather },
lora: { label: "Lora", font: lora },
playfairDisplay: { label: "Playfair Display", font: playfairDisplay },
} as const;
export type FontKey = keyof typeof fontRegistry;
@@ -188,7 +48,7 @@ export const fontVars = (Object.values(fontRegistry) as Array<(typeof fontRegist
.map((f) => f.font.variable)
.join(" ");
export const fontOptions = (Object.entries(fontRegistry) as Array<[FontKey, (typeof fontRegistry)[FontKey]]>).map(
export const fontOptions = (Object.entries(fontRegistry) as [FontKey, { label: string; font: { variable: string } }][]).map(
([key, f]) => ({
key,
label: f.label,